Using MPASM
Using PMCode:' ' PIC Configuration ' ================= @ __CONFIG _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _LVP_OFF & _WDT_OFF & _PWRTE_ON & _BODEN_ON ' ' Hardware configuration ' ====================== CMCON=7 ' disable internal comparator TRISA=0 ' Set all PORTA capable i/o to output TRISB=0 ' Set all PORTB i/o to output ' ' Hardware initialisation ' ======================= Pause 1000 ' 1 second for LCD initialisation ' ' Main loop ' ========= Start: LCDOUT $FE,1,"Should Work now!" Here: Goto here
Code:' ' PIC Configuration ' ================= @ DEVICE PIC16F628, INTRC_OSC_NOCLKOUT, WDT_OFF, PWRT_ON, MCLR_OFF, LVP_OFF, PROTECT_OFF ' ' Hardware configuration ' ====================== CMCON=7 ' disable internal comparator TRISA=0 ' Set all PORTA capable i/o to output TRISB=0 ' Set all PORTB i/o to output ' ' Hardware initialisation ' ======================= Pause 1000 ' 1 second for LCD initialisation ' ' Main loop ' ========= Start: LCDOUT $FE,1,"Should Work now!" Here: Goto here




Bookmarks