The Arduino Ethernet classes provide a means to incorporate Ethernet functionality in a ZBasic application.
This application note demonstrates this by way of four sample applications: an HTTP server, an HTTP client,
a UDP server and a UDP client.
|
The popularity of the Arduino platform has resulted in the availability of a significant amount of
embedded application and library code for it. However, many embedded developers and hobbyists prefer the simplicity
of ZBasic rather than learning the Arduino's Wiring-based language.
This application note describes a simple way to incorporate Arduino procedures and libraries in your ZBasic application
or compile a complete Arduino application for a ZBasic target device. The accompanying code archive contains
ZBasic-Arduino compatibility source code and pre-built linkable libraries for several ZBasic target devices.
|
An SD Flash drive can be a useful addition to many projects, allowing storage of data collected or
providing a store for large amounts of data to be used in the application.
This application note presents information on connecting an SD Flash drive to a native mode ZBasic device
and using the open source FatFS code base to implement filesystem functions. Information is
also presented describing how to import information into a ZBasic application about identifiers
(e.g. variables, structures, enumerations, etc.) defined in C/C++ header files.
Example code is included targetting the ZX-24n but the code is easily adapted to most
native mode ZX and AVR generic target devices.
|
A rotary encoder can be a useful human interface element for many projects.
This application note presents information on rotary encoders and describes how to interface
them to a ZX microcontroller (or other microcontroller).
Example code is included demonstrating the ideas described.
|
This application note presents three methods for connecting an inexpensive character oriented parallel LCD
to a ZX microcontroller (or other microcontroller) using 7, 3 or 2 I/O lines.
Example code is included containing the necessary interface code plus a collection of
useful higher level routines for managing the LCD and displaying characters.
Although the example code is written for a 2x16 LCD (two rows, sixteen columns), it can be easily adapted
to displays with other geometries.
|
With the introduction of native mode ZX devices it became possible to implement a broader range of
applications, notable among which are applications that require a customized interrupt service routine (ISR).
Due to the interface timing requirements, implementing an I2C or SPI slave requires a customized ISR
(in most cases). This application note illustrates how to implement both an I2C slave and an SPI slave
on a native mode ZX device. The source code accompanying this application note contains example I2C and
SPI slave implementations along with simple test drivers (i.e. a master) for each slave.
|
RS-485 networks are used by many industrial applications including process control, building
automation and even the control of lights at a concert. This application note describes the
simple hardware required to get started with networking ZX devices. The accompanying software
provides a sample application and a reusable set of APIs to send and receive messages on a RS-485 network.
|
Some applications, particularly ones that are battery powered, may need a way to monitor the
power supply voltage. Doing so using the on-board A/D converter requires a special technique
that is described in this application note. The technique can be modified to exploit other
special features of the A/D converter as well.
|
Pulse width modulation (PWM) is a useful technique for many control applications.
This application note describes how to use the PWM capabilities of the ZX microcontrollers in several ways
including servo control, H-bridge motor control and digital-to-analog conversion.
|
This application note illustrates how to connect a Devantech SRF05 Ultrasonic Range Finder.
The code can be also be used for the SRF04 and the concepts can be applied to many other rangefinder devices as well.
|
This application note illustrates how to connect an LCD using the I2C interface.
The particular display used is the Devantech LCD03 but the concepts can be applied to many other devices as well.
|
AN213 - External Device Interfacing 02 February 2006
Most microcontroller applications require the use of external devices.
This application note describes some techniques for connecting devices and describes
the additional interface circuitry that is sometimes required.
Interfacing to low voltage devices is also covered.
|
This application note describes how to connect and use the Devantech TPA81 Thermal Sensor array.
|
This application note describes how to connect and use the Robot Electronics CMPS03 Magnetic Compass.
|
Multi-tasking is a powerful tool that simplifies programming complex systems.
However, properly implementing multi-tasking applications requires a good understanding of the
problems that can arise as the various tasks attempt to access data that is shared.
Fortunately, there are standard, well-known methods to avoid such problems;
this application note discusses how to apply them in ZBasic.
|
AN209 - Task Management 02 January 2006
This application note describes some techniques for task management including a method to
implement a timeout for InputCapture().
|
Devices like the Devantech SRF10 ultrasonic range finder are commonly used in robots for collision avoidance or object detection.
This application note describes how to connect and use the SRF10 using the I2C interface, exploiting the
multi-tasking capability of ZBasic to accommodate the ranging delay.
|
The SpeakJet (from Magnevation LLC) is a completely self-contained, single chip voice and complex
sound synthesizer. This application note describes how to interface a SpeakJet with a ZX chip and use
ZBasic to generate speech or sounds using the SpeakJet chip.
|
The PlaySound subroutine synthesizes an audio signal using data from a digitized audio stream.
The interface to PlaySound is quite simple. The more difficult problem is how to get the data into your ZX program.
This application note shows how to produce a data stream that is compatible with PlaySound starting from a .wav, .mp3 or other sound file.
The accompanying .zip file includes some audio samples and a conversion program that can be used to produce
8-bit PlaySound-compatible data from real number data stream.
|
Some applications require a means of obtaining human input. Often, a small keypad (e.g. a TouchTone keypad)
is sufficient for this purpose. This application note illustrates several ways to interface a matrix keypad.
|
This application note illustrates how to receive and decode signals from an infrared remote control.
Using these techniques as a foundation, you can easily add remote controllability to your application.
|
AN203 - I/O Expansion Techniques 24 November 2005
What to do when you've run out of I/O pins?
This application note describes some common techniques for expanding the number of I/O lines available to your application.
|
AN202 - Using RCTime to Measure Charging Time 22 November 2005
The RCTime() function measures the time required for an input to change logic states.
This application note describes how to used this capability to determine the charge or discharge time of a capacitor.
|
This application note demonstrates how to generate Dual-Tone Multi-Frequency signals.
Although DTMF was designed to control telephone switching equipment it can be used in other applications as well.
|
Prior to being used as ZBasic generic target devices, raw AVR chips must be prepared by setting the device fuses,
lock bits and installing the bootloader and/or application code.
|
This application note describes some of the issues that might be encountered when migrating an
application from the ZX-24 to the more capable ZX-24a or ZX-24p.
|
This application note describes the ZX download process in sufficient detail to allow
a skilled developer implement their own downloader to communicate with ZBasic device bootloaders.
|