380 likes | 400 Views
Testing 1, 2, 3, testing, testing…. Picaxe JumpStart. Mike Hembrey WCF Technical Specialist KV0OOM. Microcontroller, not microcomputer. Microcomputer: Can perform many tasks Wordprocessing Spreadsheets Video editing Controlling CNC machines Digital communications.
E N D
Picaxe JumpStart Mike Hembrey WCF Technical Specialist KV0OOM
Microcontroller, not microcomputer • Microcomputer: • Can perform many tasks • Wordprocessing • Spreadsheets • Video editing • Controlling CNC machines • Digital communications
Microcontroller, not microcomputer • Microcomputer: • Can perform many tasks • Wordprocessing • Spreadsheets • Video editing • Controlling CNC machines • Digital communications • Microcontroller: • Assigned one task • Limited instruction set • Difference is getting blurred
Microcontroller • Several Languages • Assembler or Machine • “C” • BASIC
Microcontroller • Several Languages • Assembler or Machine • “C” • BASIC Picaxe
Microcontroller • Several Languages • Assembler or Machine • “C” • BASIC Picaxe • BASIC is really B.A.S.I.C. • What does this really mean?
Are you smarter than a 9th grader?
Are you smarter than a 9th grader? Say “yes” if you have a Ham license!
$3 Part will have limitations • Memory, but you can add more using I2C • Speed, but you can upsize to faster versions • # of I/O pins, but bigger versions have more pins • Features: analog, digital, PWM, interrupts – (X2 only)
More computing power? • Still want to stick with BASIC to reuse code?
More computing power? • Still want to stick with BASIC to reuse code? • Picaxe 40X2 Chip, faster and more pins • CoridiumARMbasic (compiled) • Parallax BASIC Stamp (educational) • MikroElectronicaMikro BASIC (PIC Clicker)
Picaxe Inputs are very simple • Digital – switches • Analog – variable resistances or voltages
Other Picaxe I/O Modes: • I2C – Inter-IC • synchronous, multi-master, multi-slave, packet switched, single-ended, serial computer bus • Serial – Pseudo RS-232 (due to voltage levels) • 300 to 115,200 baud • PWM – Pulse Width Modulation • The on-off ratio is varied to give more or less power on time • SPI – Serial Peripheral Interface • Faster, subject to noise interference, single master only
Picaxe Manuals & Tutorials • 110 Introduction (chip types [8-40 pins], and pinouts) • 279 BASIC Commands (complete language reference) • 46 Interfacing (using input and output devices) • 60 Flowcharts (simulate and create code programs) • 35Blockly (simulator using drag and drop blocks to program)
Picaxe Manuals & Tutorials • 110 Introduction (chip types [8-40 pins], and pinouts) • 279 BASIC Commands (complete language reference) • 46 Interfacing (using input and output devices) • 60 Flowcharts (simulate and create code programs) • 35Blockly (simulator using drag and dropblocks to program) • 76,600 INTERNET is your best friend
Your First Development Setup • PC with USB or RS-232 Port • Cable – RS-232 or RS-232 to Picaxe Interface (AXE027) • Integrated Development Environment (IDE) v6 • Prototyping board or solderless breadboard • 3 to 5.5-volt power source
Your First Development Setup • PC with USB or RS-232 Port • Cable – RS-232 or RS-232 to Picaxe Interface (AXE027) • Integrated Development Environment (IDE) v6 • Prototyping board or solderless breadboard • 3 to 5.5-volt power source • And This for every circuit….
Inputs, Assigned to Variables • Variables are Bit, Byte, and Word • Bit = Single bit, 0 or 1 • Byte = 8 Bits • Word = 2 Bytes, or 16 Bits • Variable spaces overlap, 16 Word variables total • These variables hold the hi-lo values of the pins.
Chomping at the BIT • w0 = b1 : b0 • w1 = b3 : b2 • w2 = b5 : b4 • w3 = b7 : b6 • etc... • b0 = bit7: bit6: bit5: bit4: bit3: bit2: bit1: bit0 • b1 = bit15: bit14: bit13: bit12: bit11: bit10: bit9: bit8 • etc...
Pin Designations, a bit Goofy • Logical Pin vs. Actual Pin • Your 08M2 program will run on the 20M2 chip
Project Idea Sources • Internet • Arduino for Ham Radio, by Glen Popiel, ARRL • More Arduino Projects… • CW Beacon and Foxhunt Keyer • Fan Speed Controller • Weather Station • RF Probe with LED (bar) Graph Display • Solar Battery Charge Monitor • On-Air Indicator (RF sensing) • Talking SWR Meter • Field Day Satellite Tracker
Project Idea Sources • Internet – Google “picaxe design projects”, 242,000 hits • Arduino for Ham Radio, by Glen Popiel, ARRL • More Arduino Projects… • Az/EL Rotator Controller(Yaesu G5400/5500) • Lightning Detector (estimates distance) • CDE/Hy-Gain Rotator Controller (all new, not a re-fit) • Load Tester (battery, to 20A load) • Voice Memory Keyer (uses pre-recorded messages) • Yaesu FT-series Rotator Controller Interface (to CDR/Hy-Gain box)
Primary BASIC Language Keywords • If Then Else • GOTO (a Label) • LabelName (the Label) • For Next • Do Loop • Gosub (a Label), Return • Pause • Input, Output (configure pins for I/O) • 120+ command keywords, 150+ non-command
Why I like the Picaxe: • Lowest cost, especially if I fry one • Programming is in BASIC, with minimal add-on libraries • Don’t like the convoluted syntax of “C” • Ideal for small dedicated projects • Easy to upscale to a higher performance controller • Finally….
Why I like the Picaxe • Lowest cost, especially if I fry one • Programming is in BASIC, with minimal add-on libraries • Don’t like the convoluted syntax of “C” • Ideal for small dedicated projects • Easy to upscale to a higher performance controller • Finally…. • The massive amount of information on the Internet!
The End Beginning Mike Hembrey Mike.kv0oom@gmail.com