Hello,
I am having a problem reading ADC values on the ZX-24n using the Compiler 4.1.3. The code below compiles fine on Ver 4.1.3 and Version 3.3.3, but only Ver 3.3.3 gives me non-zero readings for output when run.
Option TargetDevice ZX24n
Dim I20 as Integer, I19 as Integer, I18 as Integer
Sub Main()
Call PutPin(20,zxInputTriState)
Call PutPin(19,zxInputTriState)
Call PutPin(18,zxInputTriState)
Do
I20=GetADC(20)
I19=GetADC(19)
I18=GetADC(18)
Debug.Print "I20=" + Cstr(I20) + " I19=" + Cstr(I19) + " I18=" + Cstr(I18)
Sleep(1.0)
Loop
End Sub
Any idea on what is going wrong? Thanks for the help.
Don G
GetADC issue with ZX-24n
Re: GetADC issue with ZX-24n
You've run into an issue, previously undetected, that was introduced very recently. We've posted a partial update with the correction for the ZX-24n, ZX-24s and other native mode devices based on the mega644P and mega1284P. Extract the contents of the archive to the ZBasic installation directory (preserving path names). The archive contains only the change history file and the library files libmega644P.a and libmega1284P.a.dkg wrote:I am having a problem reading ADC values on the ZX-24n using the Compiler 4.1.3. [...] Any idea on what is going wrong?
A full update will follow within the next few days.
- Don Kinzer