GetADC() hangs on ZX-24x

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
coopecb1
Posts: 8
Joined: 18 May 2011, 11:30 AM

GetADC() hangs on ZX-24x

Post 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?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: GetADC() hangs on ZX-24x

Post 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.
- Don Kinzer
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post 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
- Don Kinzer
coopecb1
Posts: 8
Joined: 18 May 2011, 11:30 AM

Fixed!

Post by coopecb1 »

Works great. Thank you for finding and correcting the problem so awesomely fast!
Post Reply