I got patched up 
This is a cool chip, I need to get some.
The code below should blink an LED, on for 1/2 second and off for 1/2 second.
I do not use PM, so the config line for PM may not be correct.
The code as is works with MPASM. I will suggest you start using MPASM as you will need it for other chips and/or projects.
Also, if you are new to all of this a different chip might be better to learn on. 16F676,16F88 ??
Hope this works for you.
Code:
'16F722
'SETS UP THE INTERNAL OSC FOR 16 MHZ
DEFINE OSC 16
OSCCON= %00111000
'SET THE FUSES - COMMENT OUT THE PBP INC FILE
'PM CONFIG
'device pic16F722, INTRC_osc_noclkout, wdt_on, protect_off
'MPASM CONFIG
@ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _CP_OFF
TRISB = $00000000 'MAKES PINS OUTPUT
ANSELB =$00000000 'MAKES PORT B DIGITAL
START:
HIGH PORTB.0
PAUSE 500 '1/2 SECOND
LOW PORTB.0
PAUSE 500
GOTO START
END
Bookmarks