Hi!
I have encoutered some strange behaviour when converting string to value, using VAL function like this:
(in main loop):
[code:1:540eaf53f5]Dim Artikel_name As String * 6
Dim Artikel_address As Word
Dim X1dcl As Single
Readeeprom Artikel_name , Artikel_index
X1dcl = Val(Artikel_name)
[/code:1:540eaf53f5]
Artikel_name is stored in EEPROM and is not being changed - it 's a 6 character string "1.0dcl".
The X1dcl variable should then be around 0.99999995, but the problem is, that sometimes it goes up to a strange numbers (56, 123000.99 ).
Seting Const _valcheck = 1 and reading Err does not return anything.
I use Xmega128a1, and the only interrupt is timer/counter interrupt each 20ms. In the ISR I only do some adc conversion and I/O manipulation.
Is there any known isue with the VAL function ?
BR
Andrej
↧