Free time is very scarce these days with the job and a newborn. Question... are the interface kits available pre-assembled and soldered? If so, what is the delta cost?
Also, I've been programming ZX-40A chips for about a year, and I'm ready to move on to the native devices. I'm happy to see the recent addition of the ZX-328n to wean me off the virtual machine chips. And the price is right too. Regarding the ZX-40n, is there a price reduction for purchasing multiple chips?
Thanks.
Preassembled Interface Kits
-
- Posts: 163
- Joined: 24 March 2008, 23:33 PM
- Location: Southern California (Blue)
Re: Preassembled Interface Kits
We don't have them available as an item that can be ordered because there are several configurations depending on how you plan to use it. For example, are the square pins installed or not? If they are, are they tails up or tails down? If you expect to order them in volume, we can work out a special arrangement. If you want just a few, we'd be happy to assemble them for you at no additional cost.liam.zbasic wrote:are the interface kits available pre-assembled and soldered? If so, what is the delta cost?
The discount schedule begins at 15% for 10-24 units. Higher discounts are available higher volumes which we can discuss via email. Discounts are implemented using a "discount code" that is entered on the Payment Information page. The discount code for 10-24 units is Q10D15.liam.zbasic wrote:Regarding the ZX-40n, is there a price reduction for purchasing multiple chips?
- Don Kinzer
Re: Preassembled Interface Kits
Speed aside, the VM chips do have the huge advantage of high code density as compared to native mode.liam.zbasic wrote:Free time is very scarce these days with the job and a newborn. Question... are the interface kits available pre-assembled and soldered? If so, what is the delta cost?
Also, I've been programming ZX-40A chips for about a year, and I'm ready to move on to the native devices. I'm happy to see the recent addition of the ZX-328n to wean me off the virtual machine chips. And the price is right too. Regarding the ZX-40n, is there a price reduction for purchasing multiple chips?
Thanks.
Re: Preassembled Interface Kits
Is there any way to estimate program storage requirements for VM vs. native code?stevech wrote: Speed aside, the VM chips do have the huge advantage of high code density as compared to native mode.
Re: Preassembled Interface Kits
You mean other than compiling the code for both? My rough guide would be an estimate of 5 to 1; that is the VM code is 5 times more compact than the native code. However that doesn't tell the whole story.
For the ZVM devices based on mega32/644/644p, the program is stored in a separate EEPROM that can be either 32K or 64K bytes and the ZVM is stored in the device's flash memory. The code for the mega32 devices can sometimes be a little larger than the 644/644p devices because some of the library routines (e.g CStrHex) are implemented as VM instructions.
For the ZVM devices based on the mega128/1281/1280, the program is stored in flash together with the VM implementation and is limited to 58K. The remaining 68K is for the 4K bootloader and the VM runtime. Because the VM instructions are loaded from flash rather than EEPROM, these devices are about 25% faster than the mega32/644/644p ZVM devices.
For native mode devices based on the mega128/1281/1280, 4K is reserved for the bootloader and the remaining 124K can be used for your code. This code is a combination of basic housekeeping routines, library functions from zxLib and your own code. The smallest native mode program is almost 4K bytes for a ZX-128ne and 4.8K bytes for a ZX-1280n.
For native mode devices based on the mega328p, 4K is reserved for the bootloader and the remaining 28K can be used for your code. The smallest native mode program is around 3.5K bytes for the ZX-328n.
For the ZVM devices based on mega32/644/644p, the program is stored in a separate EEPROM that can be either 32K or 64K bytes and the ZVM is stored in the device's flash memory. The code for the mega32 devices can sometimes be a little larger than the 644/644p devices because some of the library routines (e.g CStrHex) are implemented as VM instructions.
For the ZVM devices based on the mega128/1281/1280, the program is stored in flash together with the VM implementation and is limited to 58K. The remaining 68K is for the 4K bootloader and the VM runtime. Because the VM instructions are loaded from flash rather than EEPROM, these devices are about 25% faster than the mega32/644/644p ZVM devices.
For native mode devices based on the mega128/1281/1280, 4K is reserved for the bootloader and the remaining 124K can be used for your code. This code is a combination of basic housekeeping routines, library functions from zxLib and your own code. The smallest native mode program is almost 4K bytes for a ZX-128ne and 4.8K bytes for a ZX-1280n.
For native mode devices based on the mega328p, 4K is reserved for the bootloader and the remaining 28K can be used for your code. The smallest native mode program is around 3.5K bytes for the ZX-328n.
Mike Perks
Re: Preassembled Interface Kits
I haven't written the code so was looking for a rough guide to help decide whether it might be worth the effort.mikep wrote:You mean other than compiling the code for both? My rough guide would be an estimate of 5 to 1; that is the VM code is 5 times more compact than the native code.
There is BasCOM AVR code for the ENC28J60 which, when compiled to machine language, requires about 11K. However, it also calls some functions in a couple of BasCOM object libraries so it's likely to require a bit more even without knowing whether ZBasic will be more or less efficient than BasCOM at generating AVR machine code. I'm trying to get a feel for how much room might be left (using ZX-328n) for my application code.
Is code written in C likely to be more efficient than ZBasic?
Re: Preassembled Interface Kits
The bootloader size is actually 2K leaving 30K for user code.mikep wrote:For native mode devices based on the mega328p, 4K is reserved for the bootloader and the remaining 28K can be used for your code.
There are too many factors involved to permit even rule-of-thumb estimations. For example, consider the "null program" below that compiles to 18 bytes for the ZX-24a and 3808 bytes for the ZX-24n.dlh wrote:Is there any way to estimate program storage requirements for VM vs. native code?
Code: Select all
Sub Main()
End Sub
Code: Select all
Dim i as Integer, j as Integer
Sub Main()
For i = 1 to 10
j = i
Next
End Sub
Code: Select all
Dim i as Integer
Sub Main()
For i = 1 to 10
Debug.Print i
Next
End Sub
For any specific routine, probably not. The C code generated from the ZBasic code is, in most cases, pretty much as you would have written it in C yourself so it then comes down to the efficiency of the code generator of the back-end compiler. The code size for a general application that doesn't exploit multi-tasking and doesn't use the RTC is probably going to be larger when written in ZBasic than if it were written in C because of the multi-tasking core infrastructure overhead that is included in every native mode ZBasic program.dlh wrote:Is code written in C likely to be more efficient than ZBasic?"
- Don Kinzer
Re: Preassembled Interface Kits
My guesstimate is that this would be about 1/3 that size but this is still looking like I need a much bigger shoehorn. I'll probably write the minimum code I need for the app and see how much space is left for the ENC28J60 code before trying to decide if it's feasible.dkinzer wrote:One last data point is for the RoZetta code that I have (dated June 2008). It compiles to 12,332 bytes for the ZX-40a and 40,660 bytes for the ZX-40n.
Any C code I write would probably be very sloppy - I haven't used C in many years. I was thinking of Fred Eady's C code for the ENC28J60 to replace the BasCOM object files. I can convert the BasCOM .BAS code to ZBasic but do not have source for the object files which were written in ASM.For any specific routine, probably not. The C code generated from the ZBasic code is, in most cases, pretty much as you would have written it in C yourself...