IR ENCODER/DECODER using PIC16f84A - help need ideas

Status
Not open for further replies.

vortech1

New Member
- i want to do a holtek encoder/decoder substitute using pic16f84.

-what intend to use
1. a pair of pic16f84A as my encoder and decoder
2.vishay tsop1138 or 1140 IR receiver module
3. 2 IR Leds

-what i need to know
encoder side:
pic16f84 to modulate at 38khz or 40khz (how)
1 pin for data_out i.e. PORTA, 0
1 pin for freq i.e. PORTA, 1
3 pins for address i.e. remaining PORTA pins (2-4)
8 pin for data PORTB (bit 0 to 7) input
i will only need a 3-bit address from 000 to 111 and a byte for data.
my question is: how do i modulate my data to 38k or 40k freq using assembly?
can i send it all (11 bits 3 add,8data) at once using shifting? shift_out i mean like serially shifting it out for the decoder to retrieve using shift_in?

i saw in some website a ckt with one end of the ir led on a data_out pin and another end on a PWM or freq_out pin. does this mean that freq_out pin outputs 38k pulse train while data is shifted out at the other end simulataneously? how do i do this?

-decoder side
1 pin to accept the 11 bits (3add and 8 data) connected to the IR module
3 pins for address (same pins as above encoder)
8 pins for data output (same pin config as above encoder)

-what i need to know
is it advisable for a 2 pass transmission. first pass for address to check if encoded address is the same as on the decoder add and the 2nd pass for the data if first pass is a "green-and-go!"???

using shift_in coding, can i do it all (address checking, data retreival) in one pass? checking each data 1 bit at a time? how?


sir nigel>
i've been to your tutorials about ir. i dont have pic16f628 here in the philippines so i'm using f84A. i know that f628 in your tutorials were configured as an f84. my prob is that i need an encoder and decoder. dont have holtek here as well so there is a need for a gen purpose encode/decode ships here. you used a tv remote as a transmitter, i dont think i could need that.
your in-sights would be much appreciated.


:lol:
 

My tutorials do both a transmitter and a receiver, and you could easily use the 16F84 instead of 16F628. The IR tutorial does a simple transmitter with just a few buttons, but the keypad tutorial does one using all 16 buttons on a hex keypad.
 
vortech1, welcome to the boat with IR/F84A
i just did my senior project using these babies. i had a rough time getting the data with the carrier freQ also. the timing matter of ur clock is the primary matter. it's hard to tell it all here....but u could check out one of the project that MIT students do...**broken link removed**
i used the CCS C compiler......so i only know the C routine....if u have more Q.....shoot me an IM......

also...if u havent started ur project....i strongely suggest u to choose another uP.....since u could inplement this **broken link removed** to ur project and save all the extra encode/decode coding space for ur application....
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…