im trying to get the usart of my 16F74 to work, to test it i am sending out the good old " HELLO WORLD" but i am getting nothing through on my hyper terminal, and on my data comms tester im getting utter garbage I have attached the code for you to give me some helpful tips on where i might be going wrong.
I just tried simulating the delay routine and its getting hung up in their, i will try the simpler method as suggested and let you know how it goes
Also i am using the max 233 chip and the hyperterminal is set up the same as what im sending out.
eng1 you are right, i never set portc up correctly, i assumed the pins would be set through setting the usart up . . . i assumed wrong That will teach me for not reading the data sheet thouroghly. I will give that a shot and see what happens.
Mike, you are correct. I've just checked an old program I wrote and they're both set to input. Honestly I usually use software routienes to do RS-232
So that isn't be the problem with the program, because TRISC is 0xFF on reset...
I would check the value that is loaded into the SPBRG register! fosc is 20 MHz, isn't it?
im trying to get the usart of my 16F74 to work, to test it i am sending out the good old " HELLO WORLD" but i am getting nothing through on my hyper terminal, and on my data comms tester im getting utter garbage I have attached the code for you to give me some helpful tips on where i might be going wrong.
Thanks for pointing out all the silly mistakes guys, i totally forgot to change the baud rate divider, i used the setup from the 16F627 which ran 4MHz
Iv also taken out the delay and used this instead as suggested:
I just went and tested it, and im getting most of the hello world message but theres a few extra characters thrown in from somewhere, this is what im getting through on the coms tester:
HHEMLLLNO@_&WWOCR^LDD
The other thing is im not getting any data through the hyper terminal, iv got this set to:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
I just went and tested it, and im getting most of the hello world message but theres a few extra characters thrown in from somewhere, this is what im getting through on the coms tester:
HHEMLLLNO@_&WWOCR^LDD
The other thing is im not getting any data through the hyper terminal, iv got this set to:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
I tried your code to no avail, it only sends out H permenantly
I also tried ammending my HW.asm since i noticed i was using the wrong register for the TXIF flag, i was using TXSTA when i should have been using PIR1
When i ran this program it now sends out:HLOO constantly. It seems that the data is being overwritten in the TXREG buffer? Am i testing the TXIF flag correctly?
I tried your code to no avail, it only sends out H permenantly
I also tried ammending my HW.asm since i noticed i was using the wrong register for the TXIF flag, i was using TXSTA when i should have been using PIR1
When i ran this program it now sends out:HLOO constantly. It seems that the data is being overwritten in the TXREG buffer? Am i testing the TXIF flag correctly?