Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hi...
how can i show ascii code character on lcd using oshonsoft
language: picbasic
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 6
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 5
Define LCD_EREG = PORTB
Define LCD_EBIT = 4
Define LCD_READ_BUSY_FLAG = 1
pic=16f877a
hi,
Your image shows that you have the PIC and LCD incorrectly wired.
'16F877A LCD Demo 23Aug2012
AllDigital
Define SIMULATION_WAITMS_VALUE = 1
Dim cntr1 As Byte
Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 6
Define LCD_EREG = PORTB
Define LCD_EBIT = 4
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 5
TRISA = %00000000
TRISB = %00001111
TRISC = %00000000
TRISD = %11110000
TRISE = %00000000
Lcdinit
Lcdout "Ready"
main:
Lcdcmdout LcdLine2Home
Lcdout #cntr1
cntr1 = cntr1 + 1
Goto main
End
Good spot Eric!!! I missed that... This also means his Gnd is also wrong... Its connected to PORTD.7 (Unless that was the OP's intention )
'16F877A LCD Demo 23Aug2012
AllDigital
Define SIMULATION_WAITMS_VALUE = 1
Dim cntr1 As Byte
Define LCD_LINES = 2
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 6
Define LCD_EREG = PORTB
Define LCD_EBIT = 4
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 5
TRISA = %00000000
TRISB = %00001111
TRISC = %00000000
TRISD = %11110000
TRISE = %00000000
Lcdinit
Lcdout "Ready"
Lcdout 0xff
main:
Lcdcmdout LcdLine2Home
Lcdout #cntr1
cntr1 = cntr1 + 1
'here code for timer
'if counter is reach 20, the timer1 will start but counter is still counting
'when timer is reach 5 second it will stop counting and reset count value to 0
Goto main
End
'here code for timer
'if counter is reach 20, the timer1 will start but counter is still counting
'when timer is reach 5 second it will stop counting and reset count value to 0