Define CONF_WORD = 0x3f41
Define CLOCK_FREQUENCY = 4
'#Processor PIC16F628A
AllDigital
TRISA = %11111011
TRISB = %00000000
PORTB.7 = 1 'LED on PORTB is On
UART_Init 4800 'DogFlu66
'Declaration
Dim ledIndicator As Byte
Dim char As Byte 'DogFlu66
Dim index As Byte 'DogFlu66
'LCD 2x16
Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTA
Define LCD_RSBIT = 2
Define LCD_EREG = PORTA
Define LCD_EBIT = 3
Lcdinit 0
'Show First Time On LCD
Lcdcmdout LcdLine1Pos(1)
Lcdout "PCB Etching" 'First Line
Lcdcmdout LcdLine2Pos(1)
Lcdout "Mini Osh" 'Second Line
'---------DogFlu66 ----------------------------
For index = 0 To 12
char = LookUp("0123456789ABC"), index
UART_Write char 'By changing the "Uart_Write" command to another you can send the ASCII to any other peripheral.
Next index
UART_Write CrLf, "End", CrLf
'End
For ledIndicator = 59 To 0 Step -1 'CountDown till reach 0
Lcdcmdout LcdLine2Pos(15)
Lcdout #ledIndicator 'Place number for CountDown in Second Line C15
If ledIndicator < 10 Then Lcdout " ", #ledIndicator
WaitMs 990 'Wait till reach
Next ledIndicator
Lcdcmdout LcdClear 'Off LCD
PORTB.7 = 0 'Then LED On PORTB is Off
'Continue to main function
main:
'Test function Hex stored to eeprom and show as an ASCII
'--------- SAGOR -------------------------------
EEPROM 30, 0x01, 0x15, 0xa0 'T1CON,T1H,T1L, 30ms '???
EEPROM 35, 0x11, 0x77, 0x48 'T1CON,T1H,T1L, 35ms '??w?
EEPROM 40, 0x11, 0x63, 0xc0 'T1CON,T1H,T1L, 40ms '??c
EEPROM 45, 0x11, 0x50, 0x38 'T1CON,T1H,T1L, 45ms '??P?
EEPROM 50, 0x11, 0x3c, 0xb0 'T1CON,T1H,T1L, 50ms '??<?