Page 1 of 1

GetADC() hangs on ZX-24x

Posted: 18 May 2011, 13:55 PM
by coopecb1
Calling GetADC stops everything:

Code: Select all

Option TargetDevice ZX24x
Option Pin15 "T"
Sub Main()
	dim hangz As Single
	const mypin as Byte = 15
	hangz = 0.0
	Debug.Print "Got to here: ";hangz
	Call GetADC(15, hangz)
	Debug.Print "Did not get here: ";hangz
End Sub
It never gets to "Did not get here: ". Is there something special about the 24x?

Re: GetADC() hangs on ZX-24x

Posted: 18 May 2011, 15:50 PM
by dkinzer
coopecb1 wrote:Calling GetADC stops everything:
We are able to reproduce the issue you're seeing but we don't yet know why it's happening.

Posted: 18 May 2011, 17:36 PM
by dkinzer
The source of the problem has been found and corrected; it only affects xmega-based ZX devices. You can download an updated partial set of ZBasic Library files via the link below. The contents of the downloaded archive should be extracted (preserving path prefixes) to the zlib subdirectory of the ZBasic installation directory. When you're finished you should find two files with today's date in the zlib\avr\lib subdirectory. Re-compiling your code should then produce the correct result.

http://www.zbasic.net/download/zlib/3.3 ... _xmega.zip

Fixed!

Posted: 19 May 2011, 8:08 AM
by coopecb1
Works great. Thank you for finding and correcting the problem so awesomely fast!