View previous topic :: View next topic |
Author |
Message |
NAVI
Joined: 10 Oct 2015 Posts: 11
|
Posted: Fri Oct 16, 2015 2:51 pm Post subject: Write string variable to the DATA EEPROM |
|
|
Hello!
I want to write string variable to the DATA EEPROM.
Code: | Dim A As String * 3
Writeeeprom A , 1
.
.
.
Readeeprom A , 1
LCD A |
So it is not working. How to do it?
Thank you!
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Fri Oct 16, 2015 3:26 pm Post subject: |
|
|
Run this in simulator
Remark $sim i you want to try in real chip
Code: | $regfile = "m8adef.dat"
$crystal = 8000000
$hwstack=40
$swstack = 16
$framesize=32
$sim
Dim String_in_sram As String * 10
Dim String_in_ee As Eram String * 10
String_in_sram = "Test pass" 'test string
String_in_ee = String_in_sram 'write string into eeprom
String_in_sram = "" 'clearing string only for test
Locate 1 , 1 : Lcd String_in_sram ' only for showing that string contains nothing
String_in_sram = String_in_ee 'read back from eeprom.
Locate 2 , 1 : Lcd String_in_sram 'let`s try now
End
|
|
|
Back to top |
|
|
NAVI
Joined: 10 Oct 2015 Posts: 11
|
Posted: Fri Oct 16, 2015 3:57 pm Post subject: |
|
|
Thank you, EDC! So works .
Best wishes! |
|
Back to top |
|
|
toto
|
Posted: Tue Oct 20, 2015 1:24 pm Post subject: |
|
|
Hello,
In simulator lcd it show
sest pas
Anyone know why?
Best regards
toto |
|
Back to top |
|
|
toto
|
Posted: Tue Oct 20, 2015 3:20 pm Post subject: |
|
|
Hello,
ok, solved. Must add the line
Config Lcd = 16 * 2
Best regards
toto |
|
Back to top |
|
|
toto
|
Posted: Fri Feb 05, 2016 6:05 pm Post subject: |
|
|
Hello,
And how to write strings to external eeprom like 24c64 ?
Regards
toto |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sat Feb 06, 2016 11:39 am Post subject: |
|
|
Please look at the samples files, and the search index
jp
|
|
Back to top |
|
|
|