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
ZBASIC (native mode devices) and Arduino applications

 
Post new topic   Reply to topic    Forum Index -> General
Author Message
kranenborg



Joined: 27 Jul 2009
Posts: 37
Location: Uppsala, Sweden

Posted: 04 August 2009, 23:35 PM    Post subject: ZBASIC (native mode devices) and Arduino applications Reply with quote

Hello,

I am a newcomer to the ZBASIC concept (just received two ZX328l parts to experiment with) with a strong background in PICAXE apps. I chose the ZBASIC platform as the best available BASIC-compatible platform because of its VB6 fundament as well as a natural grow-path for larger/faster applications that do not fit easily anymore into the PICAXE's PBASIC-style programming model and interpreter concept.
Reading the documentation and the forum on Native Mode programming I suddenly realized that on the ZX328l there is the option to use C-code inlining which potentially opens up the possibility to include application software written in C (but I do recognize that the ZBASIC system library implements basic programming elements at a higher abstraction level and thus should make application development much easier).
My question is: Since the Arduino platform is also based on C and uses gcc does this then imply that with buying two ZX328l's I have bought myself implicitly and unintentionally a very cheap Arduino platform as well or are there certain limits in the use of included library files that would preclude this? I ask this because the Arduino has an interesting application software base and it seems to me that the design philosophy of the ZBasic native mode devices regarding compilation is very, very close to that of the Arduino since they both are based on avr-gcc and the ATMega328p.
(I promise to do development generally in ZBasic though ...)

/Jurjen


Last edited by kranenborg on 05 August 2009, 14:41 PM; edited 1 time in total
Back to top
dkinzer
Site Admin


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

Posted: 05 August 2009, 0:01 AM    Post subject: Re: ZBASIC (native mode devices) and Arduino applications Reply with quote

kranenborg wrote:
does this then imply that with buying two ZX328l's I have bought myself implicitly and unintentionally a very cheap Arduino platform as well [...]
You could use the ZX-238L chips as Arduino devices but to do so you would need to find a mega328P Arduino bootloader and the corresponding mega328P Arduino "system code" or port it yourself. You would also need an AVR programmer to "burn" the bootloader into the chip. Of course, once you do that it is no longer a ZX-328L and you would have been better off buying raw mega328P chips.

You may be able to use portions of code written for the Arduino platform in a ZBasic application on the ZX-328L. Whether or not that is feasible depends on the resources used by the Arduino code snippets and the assumptions that the code makes. The more self-contained the code is the more likely it is that you can use it on the ZBasic platform.
Back to top
kranenborg



Joined: 27 Jul 2009
Posts: 37
Location: Uppsala, Sweden

Posted: 06 August 2009, 5:01 AM    Post subject: Reply with quote

Thanks Don,

/Jurjen
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 666

Posted: 07 August 2009, 12:45 PM    Post subject: Reply with quote

I believe that OakMicros has a version of their hardware that has an Arduino-compatible bootloader. If I am not mistaken, it uses at ATMega328 and uses a USB interface.

I have no experience with Arduino, but it seems to me that it would be even better to use a native mode ZX if you want to use C or the standard mode ZX devices if you like BASIC. However if you have extensive experience with Arduino, or a large base of code that you need to retain, then I can definitely see staying with the Arduino platform.

-Tony
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 07 August 2009, 14:24 PM    Post subject: Reply with quote

spamiam wrote:
I believe that OakMicros has a version of their hardware that has an Arduino-compatible bootloader.
Just to clarify this comment. Oak Micros sells a device called the om328p which has the same circuit board as the ZX-328nu but can be configured with different bootloaders and crystal frequencies. In particular the om328p can be ordered with a 16Mhz crystal and the Arduino mega328p bootloader. This is the same bootloader used by the standard Arduino Duemilanove and means that the om328p is compatible with Arduino Duemilanove except it comes in a package even smaller than the Arduino Nano.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 08 August 2009, 3:19 AM    Post subject: Reply with quote

can one switch between the ZBasic bootloader for native and some other bootloader by using an ISP or JTAG?
Back to top
dkinzer
Site Admin


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

Posted: 08 August 2009, 3:42 AM    Post subject: Reply with quote

stevech wrote:
can one switch between the ZBasic bootloader for native and some other bootloader by using an ISP or JTAG?
On ZX devices, JTAG isn't enabled so that is out of the question. On the other hand, you could use ISP to erase the device and write another bootloader or other program to it. That is a one-way street, however, since the ZX bootloader isn't available and therefore couldn't be re-written.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 08 August 2009, 16:57 PM    Post subject: Reply with quote

makes sense.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> General 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