mr_anderson
Advanced Member level 4
pic16f84 uart
Hi
i am using MikroC to program my 16F84A as u know it doesnot have a hardware UART pins so i am using the Soft_Uart library provided with MickroC ( it is the same provided with MikroBasic and MikroPascal ) i have programmed the PIC with a simple test program (shown below) that sends the character 'A' = 0x41 using the UART software library each 1 second.
i have connected the pin RB2 ( the serial Tx) to the MAX232 and connected it to the serial port of a the computer (pin 2) then opened the Hyper Terminal waiting to get the 'A' but i get nothing, did any one used the Soft_Uart library i mean is it reliable and is the Hyper Terminal dump or some thing like that. i supposed i have done things as it should be done but i am not getting the 'A' on the screen.
what software do u use to send, receive data on the serial port instead of the Hyper Terminal because it sucks.
any ideas, reviews, suggestions would be helpful.
Thank you.
Note: i am using a crystal oscillator of 11.0592 for the clock which should be efficient.
//----------- the PIC 16F4A program
char data=0x41;// which is the character A
void main()
{
// initialization of the UART with (8 bit, 9600 baud rate, no parity, non inverted)
Soft_Uart_Init(PORTB,1,2,9600,0);
do
{
// the PIC should send the 'A' then waits 1 second then sends it again
Soft_Uart_Write(data); // send data via UART
Delay_ms(1000); // wait 1 second
}
while(1);
}
Hi
i am using MikroC to program my 16F84A as u know it doesnot have a hardware UART pins so i am using the Soft_Uart library provided with MickroC ( it is the same provided with MikroBasic and MikroPascal ) i have programmed the PIC with a simple test program (shown below) that sends the character 'A' = 0x41 using the UART software library each 1 second.
i have connected the pin RB2 ( the serial Tx) to the MAX232 and connected it to the serial port of a the computer (pin 2) then opened the Hyper Terminal waiting to get the 'A' but i get nothing, did any one used the Soft_Uart library i mean is it reliable and is the Hyper Terminal dump or some thing like that. i supposed i have done things as it should be done but i am not getting the 'A' on the screen.
what software do u use to send, receive data on the serial port instead of the Hyper Terminal because it sucks.
any ideas, reviews, suggestions would be helpful.
Thank you.
Note: i am using a crystal oscillator of 11.0592 for the clock which should be efficient.
//----------- the PIC 16F4A program
char data=0x41;// which is the character A
void main()
{
// initialization of the UART with (8 bit, 9600 baud rate, no parity, non inverted)
Soft_Uart_Init(PORTB,1,2,9600,0);
do
{
// the PIC should send the 'A' then waits 1 second then sends it again
Soft_Uart_Write(data); // send data via UART
Delay_ms(1000); // wait 1 second
}
while(1);
}