⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ramtron.bas

📁 82 sample programs written in BASCOM-8051 for 8051 developement
💻 BAS
字号:
'-------------------------------------------------------
'                  (c) 2001 MCS Electronics
'                        RAMTRON.BAS
' This example shos how to use the www.ramtron.com eeprom
' to be used a XRAM
'-------------------------------------------------------
'it works only for the 8252
$regfile = "89s8252.dat"


'tell the compiler about ramtron
'THIS SAMPLE WILL NOT SIMULATE beause of the $RAMTON directive
'Suggestion is to add the directive when you simulated your program
$ramtron

'dim some variables
Dim X As Byte , X1 As Byte

'Now dim XRAM. This will be stored in the Ramtron devic
Dim Z(10) As Xram Byte
Wait 1


'I used P1.3 for the CS so the mcs.lib also uses this pin
'P1.4 could be used too but it needs a change in the mcs.lib
'This sample works actually!
'But since I also have code like *+4 it will not work always
'I need to rewrite that code. Let me know when some routines dont work
'with the $ramtron directive

'fill the data
For X = 1 To 10
  Z(x) = X
Next

'print the data
For X = 1 To 10
  Print Z(x)
Next
End

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -