pic16c54


Results 1 to 10 of 10

Thread: pic16c54

Threaded View

  1. #1
    necati's Avatar
    necati Guest

    Default pic16c54

    Hi,
    I found a code in Microchip's site with extention "asm".
    But I dont know how to convert it to hex file so can be put in pic16c54.

    What program do I need for converting?

    inside the file is like:

    ; *********************************************
    ; * PIC Egg Timer Give-Away *
    ; * *
    ; * Author: John Day *
    ; * Sr. Field Applications Engineer *
    ; * Northeast Region *
    ; * *
    ; * Revision: 1.2 *
    ; * Date September 22, 1994 *
    ; * Part: PIC16C54-LP/P or PIC16LC54A/P *
    ; * Fuses: OSC: LP *
    ; * WDT: OFF *
    ; * PuT: OFF *
    ; * CP: OFF *
    ; *********************************************
    ;
    ; This program is intended to run on a 32 Khz watch crystal and connects
    ; to four multiplexed seven segment displays. It displays the current
    ; time, alarm time and egg count down timers. There are switches that
    ; allow the user to set the alarm, timer and clock functions.

    LIST F=INHX8M,P=16C54
    INCLUDE "c:\pictools\picstarc\p16C5X.inc"
    __FUSES _CP_OFF&_WDT_OFF&_LP_OSC

    ORG 07h
    ; ****************************************
    ; * Static RAM Register File Definitions *
    ; ****************************************
    INDADDR EQU 0 ; Indirect address register
    DISPSEGS_A EQU 07h ; Current Display A segment bit pattern
    DISPSEGS_B EQU 08h ; Current Display B segment bit pattern
    DISPSEGS_C EQU 09h ; Current Display C segment bit pattern
    DISPSEGS_D EQU 0Ah ; Current Display D segment bit pattern
    CLK_SEC EQU 0Bh ; Clock second counter (0-59)
    CLK_MIN_LD EQU 0Ch ; Clock minute low digit counter (0-9)
    CLK_MIN_HD EQU 0Dh ; Clock minute high digit counter (0-5)
    CLK_HOUR_LD EQU 0Eh ; Clock hour low digit counter (0-9)
    CLK_HOUR_HD EQU 0Fh ; Clock hour high digit counter (0-2)
    ALM_MIN_LD EQU 10h ; Alarm minute low digit counter (0-9)
    ALM_MIN_HD EQU 11h ; Alarm minute high digit counter (0-5)
    ALM_HOUR_LD EQU 12h ; Alarm hour lor digit counter (0-9)
    ALM_HOUR_HD EQU 13h ; Alarm hour high digit counter (0-2)
    TMR_SEC_LD EQU 14h ; Timer second low digit counter (0-9)
    TMR_SEC_HD EQU 15h ; Timer second high digit counter (0-5)
    TMR_MIN_LD EQU 16h ; Timer hour low digit counter (0-9)
    TMR_MIN_HD EQU 17h ; Timer hour high digit counter (0-2)
    KEYPAT EQU 18h ; Currently pressed key bits
    FLAGS EQU 19h ; Status of alarms, display on, etc.
    PREVTMR0 EQU 1Ah ; Used to determine which TMR0 bits changed
    PREVSCAN EQU 1Bh ; Store Common Cathode display scan state
    TEMP EQU 1Ch ; Temporary storage
    DISPONCNT EQU 1Dh ; Time the displays have been on
    MODE_COUNT EQU 1Eh ; Current mode state
    ALARMCNT EQU 1Fh ; Time the alarm has been sounding
    ; ****************************************
    ; * Flag and state bit definitions *
    ; ****************************************
    #define SECBIT TEMP,7 ; Bit to spawn 1/4 second count
    #define SCANBIT TMR0,0 ; Bit to spawn display MUX
    #define MODEKEY KEYPAT,4 ; Bit for MODEKEY pressed
    #define UPKEY KEYPAT,6 ; Bit for UPKEY pressed
    #define DOWNKEY KEYPAT,5 ; Bit for DOWNKEY pressed
    #define MODEKEYCHG TEMP,4 ; Bit for delta MODEKEY
    #define TIMENOW FLAGS,7 ; Flag to indicate 1 second passed
    #define ALARMNOW FLAGS,3 ; Flag to indicate wakeup alarm
    #define EGGNOW FLAGS,4 ; Flag to indicate egg timer alarm
    #define ALARMOK STATUS,PA0 ; Flag to enable wakeup alarm
    #define EGGOK STATUS,PA1 ; Flag to enable timer alarm


    and goes on..........
    Last edited by necati; - 31st May 2005 at 17:37.

Similar Threads

  1. pic16c54a
    By mavi in forum Schematics
    Replies: 16
    Last Post: - 9th March 2006, 18:10

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts