I've had no issues with a 4 MHz xtal and Debug pushing 115200 baud. Am I doing something wrong(right)?
Ron
I've had no issues with a 4 MHz xtal and Debug pushing 115200 baud. Am I doing something wrong(right)?
Ron
Hello,
I have increassed the frec. of the crystal to 18.432 Mhz (I use this not very usual frec for generating accurate 4ms periodic interrupts) and put
DEFINE OSC 16
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 115200
in the testing software.
HSEROUT can output now 49 bytes in 3.340ms from inside a for..next loop (it counts an small time for jumping from the end to the begining of the for), what makes about 146Kbit/sec. The PIC used is a 16F876-20.
Ron, could you tell me what model have you pushed to 115200 baud with a 4Mhz crystal? I will try to reproduce your results. I do not like loosing time rediscovering the gun-podwer.
Last question: how can I define my 18,432Mhz oscillator to let PB generate accurate timming? Could it be done?
Thanks a lot
Maxi.
>> Last question: how can I define my 18,432Mhz oscillator to let PB generate accurate timming? Could it be done?
No. If you want to use faster clock speeds with PBP keeping good order, pick a frequency that PBP supports - see PBP's manual.
Thanks Melanie. I yesterday put a 20Mhz XTal and all in my "old fashioned assembler firmware" started to run under PBP (there is some line in assembler for the interrupt handler, but in general the program has won in clarity and number of features).
Maxi.
I am using a 12f629 when I use the internal oscillator my project runs great, However when I switch to the below config and use a 10 mhz ceramic resonator my project does nothing. Please help me understand what I am doing wrong?
#CONFIG
cfg = _HS_OSC_
cfg&= _WDT_ON ; WDT enabled
cfg&= _PWRTE_OFF ; PWRT disabled
cfg&= _MCLRE_OFF ; GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD
cfg&= _BODEN_ON ; BOD enabled
cfg&= _CP_ON ; Program Memory code protection is enabled
cfg&= _CPD_OFF ; Data memory code protection is disabled
__CONFIG cfg
#ENDCONFIG
define OSC 10
Give this a try.
Code:#CONFIG __config _HS_OSC & _WDT_ON & _MCLRE_OFF & _CP_OFF #ENDCONFIG
Dave
Always wear safety glasses while programming.
Thank You for your reply! I am up and running. Your code worked and I found my code should have been
#CONFIG
cfg = _HS_OSC
cfg&= _WDT_ON
cfg&= _PWRTE_OFF
cfg&= _MCLRE_OFF
cfg&= _BODEN_ON
cfg&= _CP_ON
cfg&= _CPD_OFF
__CONFIG cfg
#ENDCONFIG
define OSC 10
Bookmarks