Steve, you beat me to it, I was just downloading your Calculator program (thank you for sharing your work with us).
I posted in the new values Unfortunaly there is still garbage coming up in Serial Communicator (see example below) although it does seem more consistent.
When you see that kind of data,you will be sure that the baudrate is not propper together with the parity and the number of data and stopbits.
Try to figger out what is the right baudrate. You can play with your settings of your read program
Slight correction to the wording of my original post. It should have read 12Mhz Crystal clock and not 10, although I did have it right in my coding as far as the DEFINE OSC 12 was correct. I could not work out why my calculations were wrong when compared to the results from Steve's excellent calculator (link shown below). A stupid mistake, but after correcting things, it still does not make any difference to the problem I am having. I have tried changing all the Parameters in Serial Communicator to all the different combinations of settings available and still no joy.
Or the config fuses are not set correctly, or the OSC speed is not the right one OR the MAX232 circuit is bad OR there's a little hardware problem, OR the serial communicator is not set properly OR all DEFINEs are not written in UPPERCASE.
Bellow is tested and work on a 16f877.. but it shouldn't make any difference whatever PIC you're using...
Code:
define OSC 12
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_SPBRG 77 ' 2400 Bauds
DEFINE HSER_CLROERR 1
START:
hSEROUT ["HELLO, THIS IS A TEST",13,10]
PAUSE 100
GOTO START
Yep, all chips have a 104 Cap near-by. Hold fire a while on this problem chaps. I tried programming an EPROM version of the processor instead of using my beloved ICEPIC2, and I am getting nothing happening, unfortunetly I have to go out now, but will continue tomorrow.
Bookmarks