SwingeyP
Member
Hello again,
Can anyone help me with this one please.
I have a simple LCD hello world code runs fine on a 16f628a but won't run on a 16f88.
Pin assignments are the same - internal osc - configuration word the same- fine in simulation
What am I doing wrong?
Regards - Paul
Can anyone help me with this one please.
I have a simple LCD hello world code runs fine on a 16f628a but won't run on a 16f88.
Pin assignments are the same - internal osc - configuration word the same- fine in simulation
What am I doing wrong?
Regards - Paul
Code:
'Define SIMULATION_WAITMS_VALUE = 1
Define CONF_WORD = 0x3f50 'Internal Oscillator'
Define CLOCK_FREQUENCY = 4
AllDigital
'define the ADC stuff
'Define ADC_CLOCK = 3 'default value is 3
'Define ADC_SAMPLEUS = 10 'default value is 20
'Define the comms for the LCD display.
Define LCD_LINES = 4
Define LCD_CHARS = 20
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 4 'Use the high order bits'
Define LCD_RSREG = PORTA
Define LCD_RSBIT = 2
Define LCD_EREG = PORTA
Define LCD_EBIT = 0
Define LCD_RWREG = PORTA
Define LCD_RWBIT = 1
Define LCD_READ_BUSY_FLAG = 1
Define LCD_COMMANDUS = 5000 'delay after LCDCMDOUT, default value is 5000
Define LCD_DATAUS = 100 'delay after LCDOUT, default value is 100
Define LCD_INITMS = 20
'--- Variables
'Dim adc1 As Word
Lcdinit LcdCurBlink
Lcdcmdout LcdClear
WaitMs 500 'Give everything time to power up 2 seconds?
'adcon0 = 0xc0 'set A/D conversion clock to internal source
'adcon1 = 1 'set PORTA pins as analog inputs
'High adcon0.adon 'turn on A/D converter module
loop:
'Adcin 3, adc1
Lcdcmdout LcdLine1Pos(1)
Lcdout "Hello "
Goto loop