Author |
Topic |
|
zrockets
3 Posts |
Posted - 07/22/2008 : 21:24:59
|
Hi, I just got me pic12f629 programmer from MCUmall. I been searching around for Assembler with no luck. I tried MPASM, but it doesn't give me an option to select 12f629 on the processor type. Is there any other Assembler that I can use to compile pic12f629. |
|
Reply #1
ZLM
2945 Posts |
|
Reply #2
zrockets
3 Posts |
Posted - 07/25/2008 : 16:15:43
|
Thank you for the reply.
I trying MPLAB, but it already drove me insane. Here is a simple code turn led on and off got from http://www.talkingelectronics.com/projects/StartHere12F629/StartHere12F629-P2.html I compiled and programmed onto the chip. But when I test with leds nothing... no output.
Can someone please help me out if I did anything wrong or didn't do. Just trying to figure out if I create project right.
LIST P=12F629 ; list directive to define processor #INCLUDE <P12F629.INC> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF ; globals
fileA equ 26h fileB equ 27h filec equ 28h ; bits on GPIO pin7 equ 0 ;GP0 output to LED pin6 equ 1 ;GP1 pin5 equ 2 ;GP2 pin4 equ 3 ;GP3 pin3 equ 4 ;GP4 pin2 equ 5 ;GP5 ;------------------------------------------------------------------------------ START ORG 0X0000 nop nop nop nop nop nop SetUp bsf STATUS, RP0 ;Bank 1 movlw b'10000110' ;Turn off T0CKI, prescale for TMR0 = 1:128 movwf OPTION_REG movlw b'00110111' ;Turn on all output output movwf TRISIO
call 0x3ff ;get the calibration value movwf OSCCAL ;calibrate oscillator bcf STATUS, RP0 ;bank 0
clrf GPIO ;Clear GPIO of junk LED bsf GPIO,pin7 ;turn on LEDs call Del bcf GPIO,pin7 ;turn off LEDs call Del goto LED
Del movlw 40h movwf filec decfsz fileA,1 goto $+2 decfsz fileB,1 goto $+2 decfsz filec,1 nop ;bsf GPIO,pin6 retlw 00
ORG 0X3FF movlw 0X20 END ; directive 'end of program'
|
|
|
Reply #3
zrockets
3 Posts |
Posted - 07/25/2008 : 21:11:52
|
Got it, Thanks |
|
|
|
Topic |
|
|
|