PIC Micro Choice

Status
Not open for further replies.
Yes you can import the compiled.asm or yourfile.asm to a MPLAB project if you wish. Or better yet just import the compiled.hex directly to the Pickit 2, clone, or? programmer. With the auto import hex feature of the Pickit 2, you have a one button to download sequence.

Here is some code for GCBasic, if you want to flash some leds on your 10F206. One could just paste into notepad, or any other editor, save to the GCBasic directory, drag and drop on download.bat, then import the compiled.hex to your programmer. A good editor program with a macro function is the best way to go to automate the process and keep your files organized.
Code:
#chip 10f206, 4 
#config INTRC_OSC

dir GPIO b'001000' 

Main: 
For test = 1 to 3 
    SET GPIO.0 ON 
    SET GPIO.1 OFF 
    WAIT 50 10ms 
    SET GPIO.0 OFF 
    SET GPIO.1 ON 
    WAIT 50 10ms 
Next
GPIO = 0
wait 1 s

For nib = 1 to 7 
    GPIO = nib 
    wait 50 10ms
Next
GPIO = 0
wait 1 s
goto Main
EDIT: Deleted unecessary code. An example of cut and pasting from other PIC project file. The offending code:
Code:
#define LED1 GPIO.0
#define LED2 GPIO.1
#define LED3 GPIO.2
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…