Hi! i am using an atmega16L microcontroller for processing the input from ht-12D and based on this input appropriate pins of microcontroller are made high.I have used port B as input and ports A and C for output.I have set the fuse bits as lfuse=0xFF and hfuse=0xC9 for using an external 8Mhz crystal and to use port C as i/o pins.I use parallel port programmer(dapa).I use this setup for making the receiver part of my robot.
The problem is i am getting the desired output only if i switch off and switch on my power supply(i am not getting my output immediately).What could be the problem?
The circuit looks ok..but the oscillator resistor for the HT12D should be 47K and not more than that. Just use a fixed 0.25 watt in place. Too note that the HT12E must use a 1M resistor. Cheers
It's a straight one shot, no loop, so if you're lucky it catches the first transmitted command and then ends. Try encapsulating the " if, else" statements in a:
Code:
while(1)
{
Your if, else statements
}
And change the resistor values as Pranam77 suggested and you should be good to go.
Like above said. You do all the setup inside the main loop too. You can put that outside the main loop, so you sort of setup your system first - and only once. This should sort the problem out or get you a lot further.
Thank u.I got the expected output after including the while loop.However i am getting only 1.5V(instead of 5V as expected) as HIGH at the output pins.What could be the problem?
The pins from which i need HIGH voltage i am getting as 1.5V instead of 5V.I measured with respect to ground(common for both ht 12 D and microcontroller).
---------- Post added at 14:45 ---------- Previous post was at 14:00 ----------
I am getting 5V at the output for other programs like glowing or blinking LED.