hello everyone i transmited data using the tx module of pic16f877 and i use hyper terminal inorder to get values, but ive obtain series of garbage characters supposed to be i should get a letter A which is 0x41h , could someone tell me what is the cause of the garbage generation?
hello everyone i transmited data using the tx module of pic16f877 and i use hyper terminal inorder to get values, but ive obtain series of garbage characters supposed to be i should get a letter A which is 0x41h , could someone tell me what is the cause of the garbage generation?
uhm sorry for not being detailed, actually im using a 74LS04(HEX inverter) to invert the data,i didnt use max232 cause its unavailable in our local electronic stores.
uhm ive used 4Mhz Crystal to oscillate my circuit and also i set my SPBRG equal to 25 to get the 9600 baud rate in that way it can match with the hyper terminal baud rate option which is 9600. is it right?
uhm ive used 4Mhz Crystal to oscillate my circuit and also i set my SPBRG equal to 25 to get the 9600 baud rate in that way it can match with the hyper terminal baud rate option which is 9600. is it right?
I would suggest you get rid of the interrupt and just try and get a simple polled version working first. I don't know which compiler you are using but I would guess at this,
Code:
#include<pic.h>
__CONFIG(3FF9H); //<<<--- this looks wrong as well - LVP enabled
void Usart_Init();
void main (void)
{
TRISA = 0xFF; //PORTA as input
TRISC = 0xC0;
PORTA = 0x00;
Usart_Init();
PEIE = 1;
GIE = 1;
while(1)
TXREG=0x41; //send "A"
while(!TXIF); //wait until sent
}
void Usart_Init()
{
TXSTA = 0x24;
RCSTA = 0x90;
SPBRG = 25;
}
i have send attachments so that you can see my connection my tx pin from pic 16f877 is connected to the input of the 74LS04 and the output is then send to the Rx pin of the serial cable/port of the pc.im sorry i cant explain clearly cause my english is poor.
what do you mean LV?? in the configuration word 3FF9? I dont understand some say its just for code protection and for setting the watchdog timer and the timer module.
what do you mean LV?? in the configuration word 3FF9? I dont understand some say its just for code protection and for setting the watchdog timer and the timer module.