Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] ZBasic

2006-02-26 by Mike Perks

stevech wrote:

> Cubloc, basicX, ZBasic - these are all interpreted p-code. Their libraries
> include routines for the AVR on-chip devices (I2C, A/D, etc). I'm 
> evaluating
> ZBasic because it has a superb compiler, multitasking (preemptive),
> Interrupt servers, and looking at the generated P-code, the compiler 
> is very
> smart.

ZBasic is much more modern than BasicX and more than 2x faster so I 
would prefer that.

Cubloc and ZBasic are different and address different markets. Informal 
measurements by other folks indicate that the ZBasic runtime is actually 
faster than the Cubloc runtime despite the fact that the two clocks at 
14.7 MHz and 18 MHz respectively. ZBasic supports multitasking (it is 
really more round robin with the ability to lock a task than preemptive) 
whereas Cubloc doesn't to my knowledge. The function library and Basic 
language for ZBasic is more advanced whereas Cubloc supports ladder 
logic and more memory.

I am expert with ZBasic but still learning about Cubloc.

> I just started this - I measured 260,000 interations per second 
> incrementing
> a long while the Virtual machine was handling their default 1000 
> interrupts
> per second for clock ticks. Seems pretty good. For sure, these VM based
> chips are not for some industrial applications, but it's sure fast to
> develop an application - esp. with the ZBasic similarity to Visual 
> Basic and
> that it does malloc/free() type of memory allocation for storage of 
> strings.

I not sure how you got 260,000 iterations per second. ZBasic is very 
fast (compared with a lowly Stamp for example) but not that fast. My 
test program run at just under 92,000 increments per second with nothing 
else going on. I have posted the code on the ZBasic forum 
http://www.zbasic.net/forum/viewtopic.php?p=706 for further discussion 
there.

Mike
http://home.austin.rr.com/perks/micros/
(AVRs, ZBasic and BasicX articles and projects)

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.