View Full Version : debug error on 12F509
Pedro Pinto
- 17th January 2009, 17:05
Hello
dat var word
I want use the pic 12F509
this instruction compile fine
debug "Hello",dat,10,13
but this donīt compile
debug "Hello",BIN16 dat,10,13
the compile show this error messages
ERROR: Macro DEBUGCOUNT?C not found in macro file
ERROR: Macro DEBUGNUM?W not found in macro file
ERROR: Macro DEBUGBIN? not found in macro file
PBP Pro 2.50
Anyone know what is the problem?
Thanks
Best regards
Pedro
Archangel
- 17th January 2009, 17:58
Did you put the DEBUG DEFINES in your code?
Pedro Pinto
- 17th January 2009, 18:11
Hello Joe S
Yes, i put
DEFINE DEBUG_REG GPIO
DEFINE DEBUG_BIT 4
DEFINE DEBUG_BAUD 2400
DEFINE DEBUG_MODE 1
DEFINE DEBUG_PACING 1000
This didn't also work too
tipo var byte
iplp var GPIO.5
bmode CON 4 ' N2400 INVERTED
inicio:
pause 1
SERIN2 iplp,bmode,800,inicio,[wait ("C"),HEX2 tipo]
Anyone a idea?
Perhaps the 12F serie don't work with the serin2
and also have problems to send like, dec var, hex var, bin var
This work
SerIn iplp,4,["OK"],andar
This not work
SerIn iplp,4,["OK"],#andar
Best regards
Pedro
Bruce
- 17th January 2009, 18:40
Some things (pretty much everything you're showing) just are not supported on 12-bit core.
http://www.melabs.com/support/12-bit.htm
Pedro Pinto
- 17th January 2009, 18:55
Hello Bruce
With the 12F609 it works, the compiler not show any errors
If i add on program begin the instruction to tune the internal oscilator
the compiler show a error message, do i not need to add the
DEFINE OSCCAL_2K 1 on the begin of the code?
Thanks
Regards
Pedro
Bruce
- 17th January 2009, 19:35
Hi Pedro,
With the 12F609 it works, the compiler not show any errors
It shouldn't show any errors. The 12F609 is a 14-bit core. The 12F509 is a 12-bit core.
do i not need to add the
DEFINE OSCCAL_2K 1 on the begin of the code?
DEFINE OSCCAL_2K 1 is for a 2K part. DEFINE OSCCAL_1K 1 would be for a 1K part, but this isn't necessary for a PIC that doesn't have a factory OSCCAL calibration value stuffed in the last program memory location or an OSCCAL register
Pedro Pinto
- 17th January 2009, 19:47
Hello again
Thank you Bruce
The internal osc of the 12F609 is 4Mhz, right?
Regards
Pedro
Bruce
- 17th January 2009, 22:57
The 12F609 internal ocs runs at 4MHz or 8MHz. IOSCFS: Internal Oscillator Frequency Select bit in the config register is used to select 4 or 8MHz.
@ DEVICE PIC12F609, MCLR_OFF, IOSCFS_4MHZ, INTRC_OSC_NOCLKOUT
@ DEVICE PIC12F609, MCLR_OFF, IOSCFS_8MHZ, INTRC_OSC_NOCLKOUT
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.