TSOP 1738 with RX pin of 8051
Hope you'll be back with the C code soon
P.S.: R2 resistance is 220? is that 220ohms? Also, is 1N4148 diode easily available? If not can I replace with some other diode or direct connection?
yes its just 220ohms, 1N4148 diode is a switching diode(fast) don't replace it with normal 1N4007, this diode serves a crucial purpose of creating equi- hi and low pulses of 38Khz (i have mentioned this in earlier post), its available in any shop where they sell resistors (costs 50 paise).
about C code, i personally don't like coding in "C", bcoz "C" just allows you to "See". whereas in assembly you go deeper and "assemble" your project
here's the Algorithm :
Tx side:
1) Initialize Serial port - 8N1-600bps or 1200bps
2) Initialize timer1 as baudrate genarator
3) make p3.2 as input (Switch)
4) poll for p3.2 to go Low
5) call a delay (debounce delay)
6) move data from data pointer into Reg A
7) send it to SBUF reg
8) increment Data pointer
9) jump back to polling p3.2 and loop while 1
Rx side:
1) Initialize Serial port - 8N1-600bps or 1200bps
2) Initialize timer1 as baudrate genarator
3) poll for RI flag to be set
4) move data from SBUF reg to Reg A
5) rip off Ascii component
6) match the data recvd with 0-9
7) if match is found display that particular number pattern on port 1
8) jmp back to polling RI flag
Arun
But I will try my best to program it in C.
Till then if someone else can help me to program the above algorithm in C :-s
IN
52
38B
852
I was unable to find 10n capacitor, I got 100n instead and I tried 100n in proteus with the final circuit but it doesn't work
Hi Paul,
So the seller gave you a 8.7 Volts (1N5238B ) Zener instead of 1N4148, no problem you can use it for time being.
no 100nf won't give you the needed Freq.
not all the sellers understand the component values - you have to tell them in commercial nomenclature for eg : 10nF cap, ask him for 103 J Green Polyester Cap don't take a ceramic 103 cap, atleast not for this project (they deviate a lot)
you need 2 no's of 10nf, see my circuit diagram
Arun
Thanks for the support
P.S. Where can I get this type of commercial reference, like you said 103 J green polyester Cap instead of 10n ceramic cap?
[ Edited Sun Jul 13 2008, 10:00 pm ]
Hey Paul,
the last letter indicates tolerance/accuracy level of the cap, and J is always better than G.
(percentage of deviation from original printed Value) for Caps
J = +/- 5%
K = +/- 10%
G = +/- 20%
similarly we have tolerance Bands on the resistors:
(percentage of deviation from original printed Value) for Resistors
Gold = 5%
silver = 10%
brown = 1% (usually costs five times that of 5% ones)
for this project you can use gold band resistors.
Arun
You mentioned G = +/- 2 % instead G = +/- 20 %
Hi Paul,
yes its just 220ohms, 1N4148 diode is a switching diode(fast) don't replace it with normal 1N4007, this diode serves a crucial purpose of creating equi- hi and low pulses of 38Khz (i have mentioned this in earlier post), its available in any shop where they sell resistors (costs 50 paise).
about C code, i personally don't like coding in "C", bcoz "C" just allows you to "See". whereas in assembly you go deeper and "assemble" your project
here's the Algorithm :
Tx side:
1) Initialize Serial port - 8N1-600bps or 1200bps
2) Initialize timer1 as baudrate genarator
3) make p3.2 as input (Switch)
4) poll for p3.2 to go Low
5) call a delay (debounce delay)
6) move data from data pointer into Reg A
7) send it to SBUF reg
8) increment Data pointer
9) jump back to polling p3.2 and loop while 1
Rx side:
1) Initialize Serial port - 8N1-600bps or 1200bps
2) Initialize timer1 as baudrate genarator
3) poll for RI flag to be set
4) move data from SBUF reg to Reg A
5) rip off Ascii component
6) match the data recvd with 0-9
7) if match is found display that particular number pattern on port 1
8) jmp back to polling RI flag
ArunArun Kumar V
Can anyone implement the above algorithm in C
[ Edited Mon Jul 14 2008, 02:26 pm ]