I am getting an error, GCASM: Symbol RP0 has not been defined, when compiling the following;
;Chip Settings
#chip 16F570, 8
#config CP_OFF, WDTE_OFF, INTRC_IO, DRTEN_OFF, BOREN_OFF, IOSCFS_8MHZ
OPTION_REG = b11000111
ADCON0 = b11111100
CM1CON0 = b11110001
CM2CON0 = b11110001
OPACON = b00000000
VRCON = b00000000
ANSEL = b00000000
#define ledC = PORTC
DIR ledC OUT
DO
FOR i = 0 to 255
ledA = i
ledB = i
ledC = i
Wait 50 ms
NEXT
Wait 500 Ms
Loop
If I run the hex file, the following port bits will not set;
RA0-RA5, RB7, RC1, RC6, and RC7.
It looks like the ANSEL, CM1CON0 and CM2CON0 registers are not getting cleared.
I did make a couple changes to the .dat file; [FreeRAM]
0C:1F
30:3F
50:5F
70:7F
90:9F
B0:BF
D0:DF
F0:FF
Issues in your code. No need to set Option_reg, this is done automatically, should be no need to set ANSEL, check your syntac on binary numbers - us 0b10101010, do not use single letter variables (soon #option explicit may fix this automatically) but looks good.
;Chip Settings
#chip 16F570, 8
#config CP_OFF, WDTE_OFF, INTRC_IO, DRTEN_OFF, BOREN_OFF, IOSCFS_8MHZ
ADCON0 = 0b11111100
CM1CON0 = 0b11110001
CM2CON0 = 0b11110001
OPACON = 0b00000000
VRCON = 0b00000000
#define ledC PORTC
DIR ledC OUT
DO
FOR ii = 0 to 255
ledA = ii
ledB = ii
ledC = ii
Wait 50 ms
NEXT
Wait 500 Ms
Loop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting an error, GCASM: Symbol RP0 has not been defined, when compiling the following;
If I run the hex file, the following port bits will not set;
RA0-RA5, RB7, RC1, RC6, and RC7.
It looks like the ANSEL, CM1CON0 and CM2CON0 registers are not getting cleared.
I did make a couple changes to the .dat file;
[FreeRAM]
0C:1F
30:3F
50:5F
70:7F
90:9F
B0:BF
D0:DF
F0:FF
[NoBankRAM]
0C:0F
OSC=LP,XT,HS,EC,INTRC_IO,INTRC_CLKOUT,EXTRC_IO,EXTRC_CLKOUT
IOSCFS=4MHZ,8MHZ
Maybe if I just wait the upcoming release will resolve all of this!
Thanks.
Not fixed in the release. :-(
Use MPASM using the GCB ASM and it will be ok.
Issues in your code. No need to set Option_reg, this is done automatically, should be no need to set ANSEL, check your syntac on binary numbers - us 0b10101010, do not use single letter variables (soon #option explicit may fix this automatically) but looks good.