Hi I just tried your program modification and it do not work. Also some people say here it should be high and you say it should always be low, this is confusing.
Code:
'/////////////////////////
'// test program
'// Using the PIC16F887
'/////////////////////////
'/////////////////////////
'// Define section //
'/////////////////////////
include "modedefs.bas"
OSCCON = %01110000 '8 Mhz
DEFINE OSC 8
ANSELH = 0
'/////////////////////////
'// LCD configuration //
'/////////////////////////
DEFINE LCD_DREG PORTB ' Set LCD Data port
DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus RB.4, RB.5, RB.6, RB.7
DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
DEFINE LCD_RSBIT 1 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTB ' Set LCD Enable port
DEFINE LCD_EBIT 0 ' Set LCD Enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits) '4 therefore put wire at 4, 5, 6 and 7 of LCD
DEFINE LCD_LINES 2 ' Set number of lines on LCD
DEFINE LCD_COMMANDUS 2500
DEFINE LCD_DATAUS 250
DEFINE CHAR_PACING 2000
pause 500
TRISE = %11111100 ' Set PORTE to all input
Clock var PORTE.0 'CP
Load var PORTE.1 'PL
Data_1 var PORTE.2 'Q7 out
input1 var byte
low Load
Mainloop:
high Load
shiftin Data_1,Clock,0,[input1 \8]
low Load
lcdout $FE,1, "Shift in"
lcdout $FE,$C0, dec2 input1
pause 300
GOTO Mainloop
End
Bookmarks