' ============================================================================= ' Program..... LCD_Demo595.bas ' Author...... Jon Williams (jonwms@aol.com) ' Copyright... Copyright (c) 1999 Jon Williams ' ' Started..... 22 OCT 1999 ' Updated..... 22 OCT 1999 ' ============================================================================= ' --[ Program Description ]---------------------------------------------------- ' ' Simple demonstration program for BX-24/LCD interface. This (74x595) ' interface requires only three pins (two, clock and data, can be shared). ' ' Project files used: ' ' -- LCD_Demo595.bas (this file) ' -- LCD_Main.bas (high-level LCD functions [converted SerialPort.bas]) ' -- LCD_595.bas (BX-24 -> 74x595 -> LCD interface) ' --[ Revision History ]------------------------------------------------------- ' ' 22 OCT 1999 : Completed and tested ' 19 NOV 1999 : Docs updated ' --[ I/O Definitions ]-------------------------------------------------------- ' ' Pin 20 = Shift clock (defined in LCD_595.bas) ' Pin 19 = Shift data (defined in LCD_595.bas) ' Pin 18 = Output latch (defined in LCD_595.bas) ' --[ Constants ]-------------------------------------------------------------- ' ' --[ Variables ]-------------------------------------------------------------- ' ' --[ Main ]------------------------------------------------------------------- ' Public Sub Main() Dim s As String Call LCDInit(LCD1Line) Call LoadCustomChars() Call LCDPutByte(LCDclear, LCDcmd) s = Chr(0) & " NetMedia BX-24" Call LCDPutStr(s) Do Call Sleep(0.0) ' other code here Loop End Sub ' --[ Tasks ]------------------------------------------------------------------ ' ' --[ Functions ]-------------------------------------------------------------- ' ' --[ Subroutines ]------------------------------------------------------------ ' Private Sub LoadCustomChars() ' point to character RAM Call LCDPutByte(LCDCGRam, LCDcmd) ' character 0 (smiley face) Call LCDPutByte(bx00000000, LCDwrite) Call LCDPutByte(bx00001010, LCDwrite) Call LCDPutByte(bx00001010, LCDwrite) Call LCDPutByte(bx00000000, LCDwrite) Call LCDPutByte(bx00010001, LCDwrite) Call LCDPutByte(bx00001110, LCDwrite) Call LCDPutByte(bx00000110, LCDwrite) Call LCDPutByte(bx00000000, LCDwrite) End Sub