rolling_message_modified.bas
来自「PicBasic program for PIC16F876A for LCD 」· BAS 代码 · 共 46 行
BAS
46 行
'Program: To perform rolling message display
'Note: To turn off display, use "LCDOUT $FE,8"
' To turn On display, use "LCDOUT $FE,12"
' To shift the character to left by one position, use "LCDOUT $FE,24"
' To shift the character to right by one position, use "LCDOUT $FE,28"
Define LOADER_USED 1 'Only required if bootloader used to program PIC
DEFINE LCD_DREG PORTb
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTb
DEFINE LCD_RSBIT 7
DEFINE LCD_EREG PORTb
DEFINE LCD_EBIT 6
DEFINE LCD_BITS 4
x var byte
main:
'Display the message first for 2x16 LCD
LCDOUT $FE,1, "Welcome to UCS"
LCDOUT $FE,$C0,"Designed by Kee"
Pause 1500
LCDOUT $FE,15
'Shift the characters to left in 16 steps
for x = 1 to 16
LCDOUT $FE,24
Pause 50
next x
Pause 500
'Display the second message
LCDOUT $FE,1, "My name is Kee K"
LCDOUT $FE,$C0,"I'm at UCS...."
'Pause 1500
'Shift the characters to right in 16 steps
'for x = 1 to 16
' LCDOUT $FE,28
' Pause 50
'next x
' Pause 500
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?