For now use Micro Code Studio and MPASAM as the assembler. I am hearing about problems with MPLAB right now.
The file you need to comment the lines in is in the PBP directory.
Assuming you have the 16F690.inc file commented on the correct lines like the above thread shows... This code should have a couple LEDs blinking.
Code:
'16F690 DEMO
' DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz
' OSCCON=%01110000
DEFINE OSC 4 'This is the default setting
OSCCON=%01100000
'The first line is if you are using PM, the second if you are using MPASAM
' @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
'VARS
LED1 VAR PORTC.0
LED2 VAR PORTC.1
START:
HIGH LED1
LOW LED2
PAUSE 250
LOW LED1
HIGH LED2
PAUSE 250
GOTO START
This should do the same as the above code but in a different way.
Code:
'16F690 DEMO_2
' DEFINE OSC 8 'Comment the 4Mhz and uncomment these for 8Mhz
' OSCCON=%01110000
DEFINE OSC 4 'This is the default setting
OSCCON=%01100000
'The first line is if you are using PM, the second if you are using MPASAM
' @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
TRISC = %00000000 '0 will make the pins an output, 1 will make them inputs
START:
PORTC = %00000001
PAUSE 250
PORTC = %00000010
GOTO START
I do not have the demo board that you have, so I hope I did not make a mistake.
Play with these and look in the manual to see how to add a button for an input.
Then change things so when the button is pressed the LEDs blink differently.
Bookmarks