📄 8051f000.bas
字号:
'-------------------------------------------------------
' 8051F000.BAS
' demonstration file for the CYGNAL C8051F000
'-------------------------------------------------------
'specify from code which chip we use:
$regfile = "8051F000.dat"
'The C8051F000 has 256 bytes of ERAM
'ERAM is the same as XRAM in BASCOM. The only difference is that
'you have no external RAM chip but that it is built into the chip
'By default the chip uses the internal ERAM when in BASCOM an XRAM variable is DIMmensioned.
'Step 1: Configure the XBRn Registers
Xbr0 = &H4
Xbr1 = &H86
Xbr2 = &H40
'When you use only the internal ERAM you can specify how much
'is in the chip:
$ramstart = 0
$ramsize = 256
'When you also have an additional RAM chip you must specify the size
'of this chip instead
'stop the watchdog
Stop Watchdog
Dim S As Xram String * 10 'will use internal ERAM
S = "Hello world"
Print S
Do
P3 = &B10101010
Wait 1
P3 = &B01010101
Wait 1
Loop
End
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -