Okay, I havent been pic programming that long, but I have been able to write simple programs with my 16f628A that would output data to the serial port of a computer from a pressure sensor and a maxim ADC. I have been working on firmware to for a Vector compass module using a pic and the code comes out to be around 15k, so I had to upgrade to a larger pic. I chose the 18f2520 with 16k.
Anyways, the problem I am having is I can get this pic to communicate to a uart host (serial port on a computer). I scraped the 15k of code and just came up with some test code that would output a simple text string over and over, and check the results in hyperterminal. Same thing. Just a bunch of characters on the screen that look like $. I know that the pic is making an effert to communicate, but something is slightly off like timing.
Here is my setup:
18f2520 with connections only to power, ground and the asyncronous output. My config bits are setup to use the internal oscillator at 8mhz, and MCLR disabled. I have defined debug to use 9600, and setup hyperterminal to use the same. My code looks something like this:
define DEBUG_REG PORTA
define DEBUG_BIT 1
define DEBUG_BAUD 9600
define DEBUG_MODE 1
define DEBUG_PACING 1000
define OSC = 8
:Main
Debug "The program is working"
Goto Main
Any suggestions?
Bookmarks