- This topic has 2 replies, 3 voices, and was last updated 12 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › ATMEGA 16+ SPI
I was doing a simple master slave data transfer program in which i passed ‘a’ thru master which shud be displayed on LCD connected through slave.. I burned both of them separately and then connected the master and slave but LCD only showed the last output that was displayed on running the hex file of the previous program.. i dont know whats wrong i have checked the program, connections etc but cant figure out…
Here are the codes:-
MASTER:
while (1)
{
spi(‘a’);
delay_ms(200);
};
SLAVE:
while (1)
{
c=spi(0);
lcd_putchar();
delay_ms(200);
}
The problem might be in your lcd_putchar() function. Post the code including the function defenition also.
you might not be using LCD clear command to clear LCD. Include clear command while intializing LCD & every time when you want to rewrite a new character.