Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | Need Help..How to convert asm file to Hex

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

Need Help..How to convert asm file to Hex - ashan_abeysekara - Jan 14 4:26:00 2004

Dear Friend,

I am new to PIC Micro and I have selected 16F84 to start my testing.
I have created an ASM program now how do I convert in to HEX file to
program in to 16F84.

My program using port A and A1(2nd ping)and I try to
turned on and off LED.

Here is my program and please advice me any thing to be add.
--------------------------------------------------------------------
;Project Name LED1.asm
;Project Using PICMicro 16F84 to set PortA as out put
;and selective output and terned LED ON & OFF STATSU equ 0x03h
TRISA equ 0x85h
PORTA equ 0x05h
COUNT1 equ 0x08h
COUNT2 equ 0x09h

bsf STATUS,5 ;switch to bank1
movlw 0x00h ;set port A as out put
movwf TRISA ;put TRISA reg a out put
bcf STATUS,5 ;returned to bank 0

;Tuened ON LED

STRAT movlw 0x02h
movwf PORTA
;Delay

LOOP1 decfsz COUNT1
goto LOOP1
decfsz COUNT2
goto LOOP1

;Tuened OFF LED

movlw 0x00h
movwf PORTA

;Delay
LOOP2 decfsz COUNT1
goto LOOP2
decfsz COUNT2
goto LOOP2
goto STRAT
end
--------------------------------------------------------------------






(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: Need Help..How to convert asm file to Hex - Rick C. - Jan 14 8:02:00 2004

You can download MPLAB from the Microchip website for free. This will allow you to compile the asm and generate a list and hex file besides showing you if you had any errors. There are other compilers but this one is most likely the best.
Rick.

ashan_abeysekara wrote:

 Dear Friend,

I am new to PIC Micro and I have selected 16F84 to start my testing.
I have created an ASM program now how do I convert in to HEX file to
program in to 16F84.

My program using port A and A1(2nd ping)and I try to
turned on and off LED.

Here is my program and please advice me any thing to be add.
--------------------------------------------------------------------
;Project Name LED1.asm
;Project Using PICMicro 16F84 to set PortA as out put
;and selective output and terned LED ON & OFF
 

STATSU       equ            0x03h
TRISA      equ            0x85h
PORTA      equ            0x05h
COUNT1      equ            0x08h
COUNT2      equ            0x09h

bsf      STATUS,5      ;switch to bank1
movlw      0x00h            ;set port A as out put
movwf      TRISA            ;put TRISA reg a out put
bcf      STATUS,5      ;returned to bank 0

;Tuened ON LED

STRAT             movlw      0x02h
            movwf      PORTA
;Delay

LOOP1            decfsz      COUNT1
            goto      LOOP1
            decfsz      COUNT2
            goto      LOOP1

;Tuened OFF LED

            movlw      0x00h
            movwf      PORTA

;Delay
LOOP2            decfsz      COUNT1
            goto      LOOP2
            decfsz      COUNT2
            goto      LOOP2
            goto      STRAT
            end
--------------------------------------------------------------------
 
 
 
 

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
 


Yahoo! Groups Links
  • To




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )