javick82
Joined: 12 Jul 2007 Posts: 43
|
Clock on PIC18F46K80 |
Posted: Mon Nov 07, 2011 8:12 pm |
|
|
I don't know why setting up the clock on the PIC gives me such a headache, but I just can't get a simple "Hello World" going on my RS232 port.
so far:
Code: |
#INCLUDE <18F46K80.h>
#NODEBUG,NOWDT //Have tried HSH,HSM,many combinations
#USE DELAY (CLOCK=20000000)
#USE RS232(XMIT=PIN_C7,RCV=PIN_C6,BAUD=9600)
void main()
{
printf("Hello, World\n\r");
while(1);
}
|
I have tried a number of combinations of PLL stuff, HSH, HSM, different clock speeds (my oscillator is 20 MHz).
I am on a brand new board, but I can print out to my onboard LCD without any issue, and I get some "noise" on my serial port monitor (cursor moves, characters appear with some settings).
Advice/direction/solutions/explanation would be greatly appreciated! |
|