Recommended Prerequisites
Introducing the PICAXE System
PICAXE to PC Connections
Introduction
Programming
a PICAXE is not hard, but it is exacting. The code must not only be
written according to well defined rules, and using very specific
terminology, but it must also take into account the details of the
circuit being programmed. For that reason, the circuit must be designed
before the code can be written, and the hardware must be built before
the code can be implemented. Some designers are able to visualize a
circuit without benefit of a schematic, but for most people, a schematic
diagram is necessary to avoid needless coding errors.
This article will cover the basics of programming a PICAXE
microcontroller, and will use a very simple test circuit and sample code
to help explain the programming process. The test circuit is shown in
the schematic diagram below, and in a labeled photograph of the circuit
built on a solderless breadboard. A list of the parts required to
duplicate the breadboard assembly is also included.
Important Notes: Building and double checking the
test circuit as shown following is highly recommended before proceeding
further in this article. A review of PICAXE to PC Connections is a good idea as well.
PICAXE Programming Test Circuit Parts List
Designation
Description
Source
Part Number
Comments
R1
Resistor, 1/4W, 22kOhms, (red, red, orange)
Digi-Key
22KQBK-ND
Required. Okay to substitute similar 1/8 watt or larger part.
R2
Resistor, 1/4W, 10kOhms, (brown, black, orange)
Digi-Key
10KQBK-ND
Required. Okay to substitute similar 1/8 watt or larger part.
R3. R4
Resistor, 1/4W, 330Ohms, (orange, orange, brown)
Digi-Key
330QBK-ND
Required. Okay to substitute similar 1/8 watt or larger part.
J1
Jack, 3.5mm, 3-conductor
Digi-Key
CP1-3533NG-ND
Optional. Depends on programming cable. See article: PICAXE to PC Connections.
LED1
LED, T1, Indicator, Green
Digi-Key
LTL-4231N
Required. Okay to substitute similar part.
LED2
LED, T1, Indicator, Red
Digi-Key
LTL-4221N
Required. Okay to substitute similar part.
C1
Capacitor, 50V, .1µF, (104)
Digi-Key
399-9797-ND
Recommended for noise suppression. Okay to substitute similar part.
U1
Microcontroller, PICAXE 08M2+
P.H.Anderson.com
PICAXE-08M2
Required. Do not substitute.
N/A
Cable, PICAXE Programming
TBD
TBD
Cable choice depends on PC ports available. See article: PICAXE to PC Connections.
N/A
Breadboard, solderless, 400 contacts
Digi-Key
377-2094-ND
Required. Okay to substitute similar part.
N/A
Wire, jumper, AWG22, solid, tinned, assorted colors
TBD
TBD
Required. Okay to substitute similar part.
N/A
Power Supply, 5VDC, 500mA, regulated, filtered
TBD
TBD
Required. Any regulated, filtered, 2.3-5.5VDC, 100mA (min.) power source is okay.
PICAXE Programming Test Circuit Parts List | ||||
---|---|---|---|---|
Designation | Description | Source | Part Number | Comments |
R1 | Resistor, 1/4W, 22kOhms, (red, red, orange) | Digi-Key | 22KQBK-ND | Required. Okay to substitute similar 1/8 watt or larger part. |
R2 | Resistor, 1/4W, 10kOhms, (brown, black, orange) | Digi-Key | 10KQBK-ND | Required. Okay to substitute similar 1/8 watt or larger part. |
R3. R4 | Resistor, 1/4W, 330Ohms, (orange, orange, brown) | Digi-Key | 330QBK-ND | Required. Okay to substitute similar 1/8 watt or larger part. |
J1 | Jack, 3.5mm, 3-conductor | Digi-Key | CP1-3533NG-ND | Optional. Depends on programming cable. See article: PICAXE to PC Connections. |
LED1 | LED, T1, Indicator, Green | Digi-Key | LTL-4231N | Required. Okay to substitute similar part. |
LED2 | LED, T1, Indicator, Red | Digi-Key | LTL-4221N | Required. Okay to substitute similar part. |
C1 | Capacitor, 50V, .1µF, (104) | Digi-Key | 399-9797-ND | Recommended for noise suppression. Okay to substitute similar part. |
U1 | Microcontroller, PICAXE 08M2+ | P.H.Anderson.com | PICAXE-08M2 | Required. Do not substitute. |
N/A | Cable, PICAXE Programming | TBD | TBD | Cable choice depends on PC ports available. See article: PICAXE to PC Connections. |
N/A | Breadboard, solderless, 400 contacts | Digi-Key | 377-2094-ND | Required. Okay to substitute similar part. |
N/A | Wire, jumper, AWG22, solid, tinned, assorted colors | TBD | TBD | Required. Okay to substitute similar part. |
N/A | Power Supply, 5VDC, 500mA, regulated, filtered | TBD | TBD | Required. Any regulated, filtered, 2.3-5.5VDC, 100mA (min.) power source is okay. |
Choosing an IDE
The operating system of the
computer that will be used to program PICAXE µCs largely determines the
choice of an Integrated Development Environment (IDE.) The table below
defines the options. PICAXE Editor 6 includes the Logicator functions,
and is the recommended choice for Windows XP, Vista, 7, 8, and 8.1
operating systems. However, AXEpad is a good choice for those just
learning the PICAXE system, and will run on Windows, Linux, and Mac
operating systems.
Operating System
PICAXE Editor 6
PICAXE Programming Editor
Logicator
WinAXEpad
LinAXEpad
MacAXEpad (Intel)
MacAXEpad (Power PC)
Windows
Yes
Yes
Yes
Yes
No
No
No
Linux
No
No
No
No
Yes
No
No
Intel Mac
No
No
No
No
No
Yes
No
PowerPC Mac
No
No
No
No
No
No
Yes
Additional information about PICAXE IDEs is available here;
follow the instructions to choose, download, and install an IDE on your
computer. Windows users could benefit by starting with WinAXEpad due to
its ease of use, and then proceeding to PICAXE Editor 6 (covered in
part 2 of this topic.)
Operating System | PICAXE Editor 6 | PICAXE Programming Editor | Logicator | WinAXEpad | LinAXEpad | MacAXEpad (Intel) | MacAXEpad (Power PC) |
---|---|---|---|---|---|---|---|
Windows | Yes | Yes | Yes | Yes | No | No | No |
Linux | No | No | No | No | Yes | No | No |
Intel Mac | No | No | No | No | No | Yes | No |
PowerPC Mac | No | No | No | No | No | No | Yes |
No comments:
Post a Comment