Neyolight
Full Member level 5
Hi ALL
I am about to loose my patience with this PIC18F4620 MCU. :-x I just dont understand why my code doesn't work. Oh and btw the code is just a simple USART from Pic dem 2 plus board to my laptop.
So I feel my problem lies in the frequency /baud rate area.
Question 1 : The max PIC18f4620 can go is 8MHZ. So if i do not touch the OSCCON register, 8MHz should be the default frequency my chip is running at? Am I correct?
Question 2: If I do touch the OSCCON register and prescale the frequency to 4MHZ, is this (4MHZ) my new Fosc now? Going by the clock diagram in the datasheep, the Fosc is 8Mhz and the rest prescaled frequencies are called "peripharal frequency". So what frequency do i use to calculate Baud rate- 4 or 8 Mhz?
I have absolutely NO IDEA why this tiny-easy-piece ( according to some) code doesnt WORK :-x
HELP :-?
I am about to loose my patience with this PIC18F4620 MCU. :-x I just dont understand why my code doesn't work. Oh and btw the code is just a simple USART from Pic dem 2 plus board to my laptop.
So I feel my problem lies in the frequency /baud rate area.
Question 1 : The max PIC18f4620 can go is 8MHZ. So if i do not touch the OSCCON register, 8MHz should be the default frequency my chip is running at? Am I correct?
Question 2: If I do touch the OSCCON register and prescale the frequency to 4MHZ, is this (4MHZ) my new Fosc now? Going by the clock diagram in the datasheep, the Fosc is 8Mhz and the rest prescaled frequencies are called "peripharal frequency". So what frequency do i use to calculate Baud rate- 4 or 8 Mhz?
I have absolutely NO IDEA why this tiny-easy-piece ( according to some) code doesnt WORK :-x
HELP :-?