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
ZX24N Demo program for timer interrupt driven stepper motor

 
Post new topic   Reply to topic    Forum Index -> Files
Author Message
spamiam



Joined: 13 Nov 2005
Posts: 661

Posted: 14 August 2008, 2:41 AM    Post subject: ZX24N Demo program for timer interrupt driven stepper motor Reply with quote

I have written a simple, demonstration program showing how to set up a timer and use the timer interrupt. The application of this technique is a crude stepper motor driver.

The program uses several programming techniques to access the ZX hardware directly. This topic was discussed in some depth in AppNote AN-216, although on different hardware. So the specifics of what bits get set and where they are set will be different for the ATMega644P. The technique will be applicable to ALL native mode devices.

Actually, the technique is applicable to all ZX devices in total, but the timer interrupt is only accessible in the native mode devices.

-Tony

P.S. ZBasic makes accessing the interrupts UNBELIEVABLY easy compared to C!!!



Steper_Nat_Int.zip
 Description:
ZIP file with the necessary program elements

Download
 Filename:  Steper_Nat_Int.zip
 Filesize:  3.48 KB
 Downloaded:  2770 Time(s)

Back to top
dkinzer
Site Admin


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

Posted: 15 August 2008, 2:22 AM    Post subject: Re: ZX24N Demo program for timer interrupt driven stepper mo Reply with quote

spamiam wrote:
ZBasic makes accessing the interrupts UNBELIEVABLY easy compared to C!!!
I thought that they were fairly comparable. In what ways do you consider it being easier?
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 661

Posted: 15 August 2008, 3:21 AM    Post subject: Re: ZX24N Demo program for timer interrupt driven stepper mo Reply with quote

dkinzer wrote:
spamiam wrote:
ZBasic makes accessing the interrupts UNBELIEVABLY easy compared to C!!!
I thought that they were fairly comparable. In what ways do you consider it being easier?


Well, when you know what you are doing, it is not all that bad to do in C, but the name for each interrupt is cryptic, and not very intuitive (although it has improved), and it is hard to find a document to get the name of the interrupts. Or maybe I just don't know where to look. I usually have to find it in the IOM file for the specific device, which is not easily found either.

In earlier incarnations there were two types of interrupt handlers, one of them called "INTERRUPT" was not actually the one you should routinely use!

Anyway, it can't get easier than the ZBasic method, methinks.

-Tony
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files 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