Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Having trouble with... Debug.print?

 
Post new topic   Reply to topic    Forum Index -> ZX-40
Author Message
drapal



Joined: 24 Jan 2006
Posts: 25
Location: Denver

Posted: 05 March 2009, 3:25 AM    Post subject: Having trouble with... Debug.print? Reply with quote

OK, it's been a long time. I have some ZX-40's that I'm trying to re-purpose. Got the dev board going again, and tried a simple program (alternate flash 2 led's) and it worked fine. Then I made a suttle change and all hell broke loose...

BTW, the ZX-40 in question is running the latest VM (2.6.3) from the web site.

Here is the code that works fine:
Code:
Sub Main()
Do While True
Call PutPin(C.0,1):Call PutPin(C.1,1):Call Sleep(0.5)
Call PutPin(C.0,0):Call PutPin(C.1,1):Call Sleep(0.5)
Call PutPin(C.0,1):Call PutPin(C.1,0):Call Sleep(0.5)
Call PutPin(C.0,0):Call PutPin(C.1,0):Call Sleep(0.5)
Loop
End Sub


When I make one change:
Code:
Sub Main()
Do While True
Call PutPin(C.0,1):Call PutPin(C.1,1):Call Sleep(0.5):debug.print "1"
Call PutPin(C.0,0):Call PutPin(C.1,1):Call Sleep(0.5)
Call PutPin(C.0,1):Call PutPin(C.1,0):Call Sleep(0.5)
Call PutPin(C.0,0):Call PutPin(C.1,0):Call Sleep(0.5)
Loop
End Sub


The ZX-40 crashes the second time through the loop. Total garbage in the debug window of the IDE and the LEDs don't flash anymore. I even went more basic (no pun intended):
Code:
Sub Main()
Do While True
   debug.print "1"
   debug.print "2"
   debug.print "3"
Loop
End Sub


Debug window says 1 3 "crash".

I know I'm going to feel really dumb when I get the answer here. Surprised
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 05 March 2009, 14:13 PM    Post subject: Re: Having trouble with... Debug.print? Reply with quote

drapal wrote:
Got the dev board going again, and tried a simple program
Which development board are you using?
Back to top
drapal



Joined: 24 Jan 2006
Posts: 25
Location: Denver

Posted: 05 March 2009, 15:22 PM    Post subject: Reply with quote

I'm using the NetMedia development board.

Another question: Does the speed of the debug port matter for this (e.g. is it possible that I'm over-running the queue of the debug port? I am using the standard speed (19200).
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 05 March 2009, 15:44 PM    Post subject: Reply with quote

drapal wrote:
I'm using the NetMedia development board.
I thought that might be the case. Does it have the A version of the AT25256? If not, that could be the problem since the non-A version is too slow for the ZX-40.

drapal wrote:
Does the speed of the debug port matter for this (e.g. is it possible that I'm over-running the queue of the debug port?
You can't overrun the queue. Debug.Print puts the string content in the output queue character-by-character, waiting for space to be available before proceeding.
Back to top
drapal



Joined: 24 Jan 2006
Posts: 25
Location: Denver

Posted: 05 March 2009, 17:11 PM    Post subject: Reply with quote

I'll have to check on the A part or not, though I think it is - in fact, I remember that it is a new part (from my parts bin Smile ), so I'm sure it is an A part.

Another test I tried: Debug.Print => Console.WriteLine. Same results Crying or Very sad
Back to top
drapal



Joined: 24 Jan 2006
Posts: 25
Location: Denver

Posted: 06 March 2009, 0:14 AM    Post subject: Reply with quote

OK, so I predicted I'd feel stupid... A non-A part from the parts drawer (into the trashcan now, of course). Cool
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZX-40 Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group