I have compiled and anssemblex and importing hex file in pickit2 and write to PIC.with this code only the second Led from the board is blinking and when press buttonthe Led is not blink.
[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
' @ device pic16F690, intrc_osc_noclkout, wdt_on, mclr_on, protect_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
[code]
The 2 code dont work
[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
TRISC = %00000000 '0 will make the pins an output, 1 will make them inputs
START:
PORTC = %00000001
PAUSE 250
PORTC = %00000010
GOTO START
[code]
I get this errors:
Error LED2.ASM 45 : [225] undefined symbol 'osccon'
---------------46-------------------------'trisc'
---------------49-------------------------'portc'
Fatal----------49 : [300] too many errors
Last edited by osceola; - 23rd August 2009 at 16:43.
Did you comment the lines in the 16F690.inc file that is in the PBP directory? Like the config thread pointed out.
In MCS do you have the box checked to use MPASM?
Dave
Always wear safety glasses while programming.
The default install of Pic Basic Pro is in C:\PBP. That is where you will find all of the *.inc files for PBP.
Dave
Always wear safety glasses while programming.
I cant do it because I have the demo version of PBP,is other way to do that?
I have not had the demo version for a long time. I think the only thing you cannot do with the demo for the chips it supports is write code over a certain size.
The install directory might be named something else though, so you will have to look around.
Dave
Always wear safety glasses while programming.
Bookmarks