
Originally Posted by
Macgman2000
I have used a couple of methods for the transmitter, all work equally well.
1). Bit bang. Togggle a pin for a duration of 1ms or whatever cadence your receive module allows for logic "1" output. Most RX module output is inverted due to a pullup resistor on the data out line. Look at the data sheet pulse width and duration diagrams. So in your code you shift a bit and test for 1 or 0 then either pause for a zero or toggle at 38Khz for a duration of 1ms (or whatever your receive module wants to see) and do it until all 8 bits have been sent out.
Advantage: you use only 1 TX pin.
Disadvantage: you are stuck in the main loop while transmitting.
One thing to begin with, I never know which PIC has HPWM, is it normally written in the datasheet?
I have 12F635 - is it capable to follow the above method? Is it possible you can write few lines of the code mainly to get 38kHz, I can try to manage the rest of the code. Thanks a lot
___________________
WHY things get boring when they work just fine?
Bookmarks