Discussion in "Project Help" started by    snehagupta    Oct 20, 2007.
Tue Oct 23 2007, 12:11 am
#11
the reason is.. if you keep pressing a button the Toggle bit in RC5 protocol doesn't change.. means the key is still pressed...
where as we only want one time input.. so we wait till user release the key and press again this also toggle the toggle bit in RC5.. so we come to know that the command is being sent is new so process it this way we avoid multiple processing of single key..

for example.. if you are using this to switch on/off a device and if user keep pressing the key then relay will go .. on .. off .. on .. off..
like that.. so to avoid this i am doing the both command and flip bit check..
Tue Oct 23 2007, 09:37 pm
#12
we are using only some buttons of remote control. i ll tell u what i understood from the code. i think we r only using channel 0 to channel 6 which give commands as 00H to 06H, power or standby button whose command is 0cH, perhaps mute and two three more and i m not getting the function of some buttons as i m unable to find which button which give command as 26H and 38H because the info is not available at net for this command. so first is which buttons are we using of remote.
Second is after getting the command we are sending signal to pc like we r sending data 30h to 39h.
i wanna know transmitting 30 h will do which opertion 31h will do which operation and so on.
Third is my r giving two different delays in this code by initializing VAR1 an dthen decrementing it. i just wanna know the delay duration of both the delays or tell me the frequency on which we r operating the device.
Please reply whenever u get time.
And please please try to clear the three doubts posted.
Tue Oct 23 2007, 10:31 pm
#13
aha! ok!
first, have you run the software? there is a help in it.. and under help there is option "Using PC Remote.."
there you will get info regarding which keys from remote are used..

In mouse mode.. only following keys from remote are used...
button 1 to 6, Vol+/-, Power
In keyboard mode.. following keys are used..
button 1 to 6, Vol+/-, Ch+/-, Power

So as you seen from the code..
button 1 to 6 will send hex 00H to 06H after detection
and Vol+/- will send 10H and 11H Power will send 0CH

the code 26H and 38H was actually for the remote i used. The remote i used is a scraped or say a used remote and it had only 9 keys. It was not having Vol+, Vol-, ch+ and ch- keys... but it was having Sleep and AV keys so i used these keys for same function of Vol+ and Vol- keys. But ofcoruse Sleep (26H) and AV(38H) key were having diff codes from Vol+(10) and Vol-(11) so i had to add the code for them.

30H to 39H means ascii code for digits 0 to 9. So when you press like Button 1 you get 01H from IR and then i send 30+01H = 31H (ascii digit 1) to serial port and after the software get the digit 1 from serial port it checks which mode user is working in.. and so act accordingly (this is just to simplify work of software). you will come to know more when i put the VB code for download. Sorry this is taking me a while. I am waiting for a tutorial to complete so i will update the whole site in a single upload.

The two delays have to be approximately 3.024mS and 1.728mS. I cannot be sure of the value because the above is the theoretical value but the actual delay was adjusted till i get the right value from IR.

I am really sorry that i did not commented the code well.. but i will do it in few minutes from now.. so you can download the updated and fully commented files again tomorrow.
 snehagupta like this.
Wed Oct 24 2007, 12:00 pm
#14
hey thanks yaar
i was not able to run the sofware bcos wenever i click on file it says this cannot be openend because of some missing file so i couldnt....... but now i downloaded the missing file and read from the help all the functions.
now i think i got it.
now please ive me the info how i can write code for PC in VB language whenever u get time...
thanks for all the help..
now i have a very stupid doubt
i wanna know u have initialized a counter in timer1 but u have not used this timer in the software like we r not checking TF1 at any stage of the program....
when we r not using this timer for delay we r doing it with the instructions only then do we have to use the instructions of initializing TMOD, TCOM and setting the bit TR1.
if there is any other use of initializing the timer pls do tell me as i m unable to identify any use of this in program....
and next is u r using the crystal of 11.0592 MHz and two capacitors for the clock of chip.r these connections same for any microcontroller?i mean the value of capacitor etc.


[ Edited Wed Oct 24 2007, 12:35 pm ]
Wed Oct 24 2007, 01:51 pm
#15
the missing file could be "MSCOMM32.dll" or something..
just google it.. and u can download it. many sites are providing them. The reason is.. these files come along with VB runtime library.

regarding your doubt, we are not enabling the timer for delay or anything and we are not even enabling the interrupts. If you have gone through the manual of 8051 then you must know that the internal shift register used for serial communication is hardwired with the timer1 output, when we enable the serial communication, timer1 provides the clock to the shift register. Try to go through the manual of 8051 throughly. they have given all the internal diagrams. Thats the reason only Timer1 can be used for serial communication not timer0. Where as in case of 8052 you have two timers to select from timer 1 and timer 2.

Check the manual for more information on the capacitor value. There is a specific range defined for the capacitor to be used.. you can also use 22uF if you want.. it depends on you.
Thu Oct 25 2007, 10:16 pm
#16
hey i wanna we r using parallel port of pc na?
on my laptop there is only one parallel port then in software there is option to chose from com1 or com3?
n parallel port we r using is DB9 or DB25?
second is can i use software which i hv downloaded frm this site and then i can make my software or i cn check only on the software written by me
and pls pls pls tell me wen ll u post info regarding VB software as i need it urgently i have to complete this project in two days... i know u r waiting for the tutorials so tht u can update site...
i need it really so if u have time can u pls mail me the info....i shall be highly obliged....thanks for all the help.....
Thu Oct 25 2007, 10:29 pm
#17
we are using serial port not parallel port. so i don't know how to use DB25 as serial port but as per the info i have it can be used for serial communication too.. you need to find out yourself how..
I will be posting the whole source code of the VB software... so you need not to worry about making your own software.. rather.. if possible keep the copyright as it is.. i know no one will do that so just saying like that
Sat Oct 27 2007, 12:42 am
#18
hey thanks for all the help....
i have finally made the circuit
and again i m asking for same thing pls pls pls give me the info how to write software code. i really need it urgently...
pls pls wenever u get time pls do reply wen u ll able to give m e the info....
u can even mail me the info...
pls do wenever u get time to do so....
Sat Oct 27 2007, 02:16 am
#19
ok!! you have to know that i am the only person doing all the work on this site.. so i have to manage time for my work and website..
at i said.. by tomorrow most probably i will update the website and you will get mail of what is being added in the site so keep just wait till i finish the work...
thank you for patience
Sat Oct 27 2007, 07:07 am
#20
ok. u r going wonderful job.... chalo i ll wait for site to be updated..tomorrow is fine...
thanks a lot for all the help provided......

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Minniemus
Sun May 19 2024, 07:39 am
Andyhet
Sat May 18 2024, 07:28 am
BrettTibre
Fri May 17 2024, 06:14 pm
Gordonfax
Fri May 17 2024, 10:28 am
Davidspils
Fri May 17 2024, 10:19 am
Patricknoind
Fri May 17 2024, 09:53 am
JeremyCycle
Fri May 17 2024, 09:46 am
FrabSeby
Thu May 16 2024, 07:31 pm