| You have in your hands ... | |
| The PICAXE Birthday Box | |
|
Your introduction to the wonderful world of PICAXE development | |
|
Contents
LED Interface Piezo Sounder Interface Temperature Interface Tilt Switch Interface
Installing the Software Installing the CD-ROM Software Microsoft Installer Software Running the Software Introduction - Don't Panic !The PICAXE Birthday Box is a self-contained unit designed to provide an introduction to the PICAXE microncontroller and embedded programming.The unit requires no previous electronics or programming skills and is designed to provide a comprehensive introduction to the PICAXE itself, interfacing and control programming and embedded software development in general. You are probably feeling rather daunted, looking at the PICAXE Birthday Box and wondering what to do with it, but don't panic ! The unit is designed so that you can take small steps into the world of programming and embedded systems by learning how to control Light Emitting Diodes, Piezo Sounders to produce sound, how to read an analogue temperature sensor and how to respond to button push stimuli. By the following the PICAXE Birthday Box Tutorial and using the comprehensive documentation provided by Revolution Education Limited, you will soon become confident about programming the PICAXE, begin to understand the fundamentals of computer programming and acquire new skills that may well turn into an addiction. No one can promise that the PICAXE Birthday Box will change your life, provide you with a better career or make you rich beyond your wildest dreams, however it will potentially provide you with hours of entertainment and enjoyment - and, inevitably, a few episodes of frustration and annoyance along the way. Welcome to the world of the Embedded Systems Programmer ! Technical Specification The unit supports the PICAXE-08, PICAXE-08M and any future 8-pin, pinout compatible, PICAXE's developed by Revolution Education. It can also be used with a whole range of Microchip PICmicro devices. The unit can be entirely self-contained using an internal battery, powered from a PC's serial port or an external supply, and is fitted with a power switch. Programming is performed using a 9-Way Female D socket allowing connection to a PC with a commonly available 9-way cable. Interfaces include tri-colour LED and Piezo Sounder, both under program control, a momentary push button for digital input signalling and a temperature sensing thermistor for analogue input reading. The programming socket allows serial data to be sent to the PC under program control and can, with the aid of a simple interface, be used as a bi-directional serial peripheral.
Power Sources A standard 9V PP3 alkaline battery or equivalent rechargeable NiCd or NiMh batteries may be used. The unit can also draw its power from an external supply through the serial port ( described later ) or it can draw its power directly from the PC. When drawing power from the PC, the power is taken from the serial port RTS and DTR lines which can be asserted under PC control. To facilitate this the serial port must deliver +12V or +15V signals and will probably not work with some laptops which only deliver +5V. It is recommended that the unit is not powered through the serial port when connected to anything other than a desktop PC. The amount of current drawn from a PC's serial port is limited to around 10mA, but this is sufficient when the unit is not connected to additional hardware being what it is delivered with. Attempting to draw too much current through the serial port can potential cause damage to the PC. Either RTS or DTR must be enabled to provide power but it is recommended that both are enabled to reduce the current drawn through each individual line. Note that the unit will draw all its current through the serial interface when connected even if a battery is fitted. The voltage delivered by the serial port will usually be greater than the voltage provided by the battery and the diode mixing will prevent drain on the internal battery. With a 9V PP3 battery fitted, the unit can be hot-swapped from being powered through the serial port by a PC or an external power supply to being using standalone, powered by the internal battery. Note that the unit will have been delivered with the ability to be powered through the serial port disabled, which will also prevent it from being used with an external power supply. It is recommended that the internal battery is removed if the device is not to be used on internal power for any period in order to prevent any leakage of the battery from damaging the unit. Switching the Unit On The power supply is switched by a push to operate, SPST latching switch ( Red ) which is mounted on the front panel. When the switch is pressed, and put into the depressed position, the contacts are closed and power is passed to the voltage regulator which powers the entire unit. When the switch is pressed again, and put into the raised position, the contacts are opened and, the regulator is disconnected from the power supply sources and turns off the unit. It is recommended that the unit is turned off when not in use to conserve power and to prolong the life of the battery. Voltage Regulation The unit contains a voltage regulator, ensuring that the PICAXE is run from +5V which allows easy interfacing to external hardware which also operates at +5V. The regulator is a transistor-style 78L05 capable of supplying currents of up to 100mA. The voltage regulator is short-circuit, overload and over-temperature protected to help ensure safe operation should there be a fault within the unit or in attached hardware.
Push Button Interface There are two front panel mounted switches; a latching power switch ( Red ) and a momentary "push to make" switch ( Green ) which can be read by an executing program ( Input Pin 3 ). The switch is wired as an Active Low; the signal read from Input Pin 3 will be zero when pushed, and non-zero otherwise. LED Interface A single tri-colour LED is mounted on the front panel. This LED is capable of showing green, red or orange illumination, or can be turned off entirely. The Red LED component is controlled by Output Pin 0 and the Green LED component is controlled by Output Pin 4. Both signals are Active High; when the output line is asserted ( HIGH ), the LED will be illuminated. The LED can be made to appear Orange by either turning on both the Red and Green LED components at the same time, or by quickly alternating between the two. The LED is turned off when neither Output Pin 0 or 4 are asserted. The LED is also illuminated when serial data is transferred from the PICAXE to a connected serial device; the LED will flash Red whilst data is being transmitted from the PICAXE. The LED will be illuminated while the PICAXE is being programmed, when SERTXD is used with a PICAXE-08M is fitted, and when a SEROUT command is issued which uses Output Pin 0. Piezo Sounder Interface There is an internal Piezo Sounder connected to Output Pin 2 which can be used to generate musical tones and other sounds. The Piezo and LED are configured so they can be used in conjunction with the TUNE and PLAY commands available on the PICAXE-08M when fitted. The Piezo can also be controlled by the SOUND command. Temperature Interface Input Pin 1 is connected to a negative coefficient temperature measuring Thermistor which allows a READADC command on Pin 1 to be used to determine the ambient temperature. The unit may be fitted with either a PICAXE-08 or the more advanced and capable PICAXE-08M ( available late 2004 ). Whereas the PICAXE-08M has an 8-bit analogue input resolution allowing accurate readings to be taken from the thermister, the PICAXE-08 has only a 4-bit resolution which will not allow temperature measurements. A unit fitted with a PICAXE-08 can be easily upgraded to use a PICAXE-08M, and requires no hardware changes, just the replacement of the chip. Note that the Thermistor is connected between Input Pin 1 and 0V with a pull-up to +5V. As the temperature increases, the Thermistor's resistance will fall, and the voltage read from Input Pin 1 will likewise fall. Tilt Switch Interface Paralleled to the Thermistor is a 'tilt sensor' switch which shorts Input Pin 1 to 0V when the unit is held vertically, which will force an analogue reading which is at, or very close to zero; this can be used to determine when the unit has been lifted and held vertically, and can be used to trigger program actions. Although the 'tilt sensor' creates a switch circuit, it is not recommended that Input Pin 1 be read as a Digital Input as when the switch is open, the input signal depends upon temperature which may cause false triggering of a Digital Input. The 'tilt sensor' activation should be determined by reading the analogue input voltage and checking its value; the Thermistor will not normally return a value as low as that returned by the tilt switch. Note that none of the units built so far, for John, Dave and Becca, contain the tilt switch.
The serial data from the PC is buffered through a signal diode to avoid problems that may manifest themselves when performing analogue inputs, as are reported to occur when the diode is not installed. The serial port interface is used for programming the PICAXE and for communicating from the PICAXE to the PC under program control, using the SERTXD command on a PICAXE-08M, or a SEROUT command to Output Pin 0 on a PICAXE-08 or 08M. A Ring Indicator (RI) signal is sent to the PC, driven through a diode connected to Output Pin 4, the same line which drives the Green LED component. This may be used as a "wake-up" or "interrupt" signal to the PC under program control. As delivered, the unit does not allow a program to receive serial data from the PC, but a simple re-configuration of an internal Molex link and the use of the interface below allows bi-directional serial transfers to be performed between the PICAXE and PC ...
When the unit is to be programmed, the switch on the interface should be moved to the "Program download" position, and moved to "Comms On" when the program begins executing. If the switch is not set correctly, it will not be possible to download programs into the PICAXE. Note that the second pole of the function switch used to direct the RI line from the PC is provided solely so the interface can be used ( when set to Program Download ) with a unit that has not been set to allow Serial Input, and uses RI to communicate with the PC. In most circumstances this part of the circuit can be discarded, with RI on the 9-Way Female D not connected and the 22K resistor wired directly to RI on the 9-Way Male D. When using the interface, serial data from the PC can be read using a SERIN command on Digital Input 1. It is important that Digital Output 4, which controls the Green LED component is kept at a low level by issuing a LOW command on Digital Output 4. This means that the PICAXE cannot use the Green LED component while performing serial input. External Power A modified serial cable can be used to provide external power to the unit through pins 4 and 7 of the unit's connector. Both pins are diode-mixed with the internal battery supply allowing the unit to be powered by both an external DC or AC power supply. The external power supply is switched to the regulator through the front panel switch ( Red ). Note that the internal two-pin Molex must be linked to enable external power to be supplied through the serial port. An interface which allows the unit to be externally powered while still providing a suitable serial interface is shown below ...
Once the two screws have been removed the rear part of the case should be gently lifted away. The circuit board attached to the rear of the case connects to the front panel switches and LED by flying leds which must not be dmaged while the case is being opened. Once the two halves of the case have been seperated, the internal circuit board can be observed, and the Molex links used for configuration can be identified from the layout shown below ...
Note that the unit should be delivered with the two-pin Molex open to disable powering through the serial port, and the three-pin Molex should have a link to the bottom pair of pins when viewed with the wiring harness to the right ( as shown in the above diagram ). To enable external serial port or external power operation, the two-pin Molex must have the link fitted. To enable the PICAXE to perform analogue readings on the thermister the three-pin Molex should have its top pair of pins linked when viewed with the wiring harness to the right. To enable bi-directional serial communications, the right pair of pins should be linked. Note that the three-pin Molex is not fitted to Dave's version of the PICAXE Birthday Box but is fitted to John's and Becca's version, and should be fitted to any future versions.
The software is designed to work with Windows 95, 98, Me, 2000, NT and XP only. You will either have been provided with a CD-ROM which contains the software required to program the PICAXE or you will have to download it from Revolution Education Limited's web site. When register for the download, an email will be sent to you which includes an installation passowd; you will not be able to complete the installation until that email has been received. Installing the Downloaded Software When you have downloaded the PICAXE Development Software and have received an email indicating what the installation password is, you will be able to install the software. To install the PICAXE Development Software, you should open Explorer, File Manager or other file browsing application, locate the directory into which you downloaded the BAS805.EXE application into and execute it. When the application executes, it will ask for a password - this is the one that was emailed to you. Enter it and left-click the Okay button. Follow the installation instructions, and the PICAXE Development Software will be installed. Installing the CD-ROM Software To install the PICAXE Development Software from the CD-ROM, insert the CD into your CD-ROM drive. If you have "auto-play" enabled, the installation program should run automatically; follow the on-screen instructions and "Install Programming Editor". If you do not have "auto-play" enabled, you should open Explorer, File Manager or other file browsing application, locate the "Progedit" folder on the CD and run the SETUP.EXE application. When installing the software from CD-ROM, you do not need to have a password to complete the installation. Microsoft Installer Software The PICAXE Development Software uses the Microsoft Installer application to install itself. The Microsoft Installer provided with Windows XP should allow installation of the PICAXE Development Software without problem. If you are using Windows 95, 98, Me, 2000 and NT you have an old version of the Microsoft Installer on your system and you may need to upgrade if you are encountering installation problems. The latest version of Microsoft Installer should be downloaded, installed, the PC re-booted, and the PICAXE Development Software installation should then be re-attempted. The latest version of Microsoft Installer can be downloaded by following the links on the Revolution Education Limited web site at ... PICAXE is a trademark of Revolution Education Ltd. PICmicro is a registered trademark of Microchip Inc. Windows and Windows NT are registered trademarks of Microsoft Corporation. The PICAXE Birthday Box is not a product of Revolution Education Limited and is not approved, recommended nor supported by them. | |||||||
|
|
| The PICAXE Birthday Box | © 2004-2005, The Happy Hippy |