PDA

View Full Version : Pb3 pic12lf1571 asm error



markedwards
- 9th June 2016, 23:27
I am attempting to program a PIC12F1571 in PBP3 and not sure why I am getting the following ASM ERRORs.
I am not using the serial port. I updated to the latest PB3 3.0.9.4 &it updated MPLAB.


Error[113] C:\PBP3\EXAMPLES\1571.ASM 45 : Symbol not previously defined (_LPBOR_OFF)
Error[113] C:\PBP3\PBPPI14E.LIB 2453 : Symbol not previously defined (TXIF)
Error[113] C:\PBP3\PBPPI14E.LIB 2480 : Symbol not previously defined (TXREG)
Error[113] C:\PBP3\PBPPI14E.LIB 2481 : Symbol not previously defined (TXREG)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (SPBRG)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (SPBRG)
Error[113] C:\PBP3\PBPPI14E.LIB 919 : Symbol not previously defined (SPBRG)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (TXSTA)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (TXSTA)
Error[113] C:\PBP3\PBPPI14E.LIB 919 : Symbol not previously defined (TXSTA)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (RCSTA)
Error[113] C:\PBP3\PBPPI14E.LIB 584 : Symbol not previously defined (RCSTA)
Error[113] C:\PBP3\PBPPI14E.LIB 919 : Symbol not previously defined (RCSTA)


#CONFIG
__config _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _BOREN_ON & _CLKOUTEN_OFF
__config _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LPBOREN_OFF & _LVP_OFF
#ENDCONFIG

DEFINE OSC 20 ' system clock at 20MHz

DEFINE ADC_BITS 10 ' A/D number of bits
DEFINE ADC_CLOCK 1 ' Uses A/D internal RC clock
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in us

DEFINE HPWM_OSC 16000000 ' PWM clock at 16MHz

ADCON1.7 = 1
TRISA = %00000100
ANSELA = %00000100

A VAR word 'Stores 10 Bit Analog Reading
B var byte

mainloop:
b = 0
porta.4 = 1
pause 2500
porta.4 = 0
pause 2500
goto mainloop ' Do it all over again

HenrikOlsson
- 10th June 2016, 07:44
Seems to compile fine here using 3.0.8.4
Make sure you use MPASMX, if I don't I get all sorts of error. If you're using MicroCodeStudio then View -> Compile & Program Options -> Use MPASMX Assembler.

/Henrik.