SlideShare a Scribd company logo
1 of 33
PICAXE Microcontrollers
  An Introduction by NearSys
What is a PICAXE?
• A family of microcontrollers
• Based on the PIC microcontroller
• Internally programmed with an interpreter and
  communications program
• Program stored in the PIC’s internal EEPROM
• Interpreter operates on one instruction at a time
PICAXE Variations
   PICAXE-08M2
   PICAXE-14M2
   PICAXE-18M2
   PICAXE-20M2
   PICAXE-28X2
   PICAXE-40X2
PICAXE Voltages
Five volt chips, but can operate at 1.8 volts
PICAXE Multiple Programs
       PICAXE-08M2
       PICAXE-14M2
       PICAXE-18M2
       PICAXE-20M2
       PICAXE-28X2
       PICAXE-40X2
PICAXE Multiple Programs
       PICAXE-08M2
       PICAXE-14M2
       PICAXE-18M2
       PICAXE-20M2
       PICAXE-28X2
       PICAXE-40X2
PICAXE Clock Speed
    PICAXE-08M2
    PICAXE-14M2
    PICAXE-18M2
    PICAXE-20M2
    PICAXE-28X2
    PICAXE-40X2
PICAXE Clock Speed
    PICAXE-08M2
    PICAXE-14M2
    PICAXE-18M2
    PICAXE-20M2
    PICAXE-28X2
    PICAXE-40X2
PICAXE Pins
• Logic low < 1.4 V
• Up to four banks, A, B, C, and D
  depending on variation
• Most I/O pins are bidirectional
• Hardware interrupts on the X2
• Software interrupts on both the M2 and X2
PICAXE Memory
•   Program
•   RAM
•   Data
•   Scratch Pad
PICAXE Memory
•   Program
•   RAM
•   Data
•   Scratch Pad
PICAXE Memory
•   Program
•   RAM (variables)
•   Data
•   Scratch Pad
PICAXE Memory
•   Program
•   RAM
•   Data
•   Scratch Pad
PICAXE Memory
•   Program
•   RAM (variables)
•   Data
•   Scratch Pad
Code Examples
          Input Commands
•   PIN
•   COUNT
•   PULSIN
•   SERIN
•   READI2C
•   READADC and READADC10
•   IRIN
•   RFIN
Code Examples
          Output Commands
•   HIGH and LOW
•   PULSOUT
•   SEROUT
•   WRITEI2C
•   PLAY and TUNE
•   SERVO
•   PMWOUT
•   IROUT
•   RFOUT
Code Examples
    Program Flow Control Commands
•   GOTO
•   GOSUB-RETURN
•   FOR-NEXT
•   DO-LOOP (UNTIL or WHILE)
•   IF-THEN-ELSEIF
•   ON-GOTO (GOSUB)
•   SELECT-CASE
•   BRANCH
Code Examples
    Communications Commands
• I2cslave 10100000,i2cfast,i2cword
• writei2c 0,("hello")
• readi2c 0,(b0,b1,b2,b3,b4)
Code Examples
      Communications Commands
•   debug
•   serout B.0, T1200_4,(“Testing”)
•   serin C.1, T1200_4,(“X”),B.0, B.1, B.2
•   sertxd (“Value: ,”B.5)
•   serrxd (B.0, B.1, B.2, B.3)
•   hsersetup b9600_4, %10
•   hserout 0,(b.0)
•   hserin 0,50
Code Examples
       Memory Commands
• PEEK-POKE
• READ-WRITE
• GET-PUT
The Editor
Editor
Selecting the Mode
Editor
Selecting the Serial Port
Editor
Example of a Text Program
Editor
Example of a Flowchart Program
Editor
Example of a Wizard
Editor
Example of Syntax Check
Editor
Downloading Program
Editor
Simulating a Program
Editor
Debugging a Program
Editor
Terminal Program
Want to Learn More?
Boise Robotics Group (The BoRG)
   Third Saturday of the Month
 Hobby Town at Cole and Ustick
        10:00 AM to noon

     Learn to Make a Robot
  A community education class
“Whether we're fighting climate change or
    going to space, everything is moved
 forward by computers, and we don't have
      enough people who can code”.

                         Richard Branson

More Related Content

What's hot

R84 d2eb4em18 1t
R84 d2eb4em18 1tR84 d2eb4em18 1t
R84 d2eb4em18 1tsecuritall
 
CodeRage XI international Conference: Arduino + Delphi Mobile Apps
CodeRage XI international Conference: Arduino + Delphi Mobile Apps CodeRage XI international Conference: Arduino + Delphi Mobile Apps
CodeRage XI international Conference: Arduino + Delphi Mobile Apps Vic Fernandes
 
Arduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsArduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsVic Fernandes
 
Arduino plus Delphi Mobile Apps - Beyond Basics
Arduino plus Delphi Mobile Apps - Beyond BasicsArduino plus Delphi Mobile Apps - Beyond Basics
Arduino plus Delphi Mobile Apps - Beyond BasicsVic Fernandes
 
Costruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCostruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCodemotion
 
2015 02 28 DotNetSpain2015 Coding4Fun
2015 02 28 DotNetSpain2015 Coding4Fun2015 02 28 DotNetSpain2015 Coding4Fun
2015 02 28 DotNetSpain2015 Coding4FunBruno Capuano
 
Bl lw085-specification-www.ttbvs.com
Bl lw085-specification-www.ttbvs.comBl lw085-specification-www.ttbvs.com
Bl lw085-specification-www.ttbvs.comTTBVS
 
OV7670 Camera interfacing-with-arduino-microcontroller
OV7670 Camera interfacing-with-arduino-microcontrollerOV7670 Camera interfacing-with-arduino-microcontroller
OV7670 Camera interfacing-with-arduino-microcontrollerSomnath Sharma
 
2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT FightBruno Capuano
 
Arduino camera interfacing OV7670
Arduino camera interfacing OV7670Arduino camera interfacing OV7670
Arduino camera interfacing OV7670Somnath Sharma
 
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of ThingsBruno Capuano
 
R4 d1fb3fcmb 5g
R4 d1fb3fcmb 5gR4 d1fb3fcmb 5g
R4 d1fb3fcmb 5gsecuritall
 

What's hot (20)

R4 b4dcmb 5g
R4 b4dcmb 5gR4 b4dcmb 5g
R4 b4dcmb 5g
 
R84 d2eb4em18 1t
R84 d2eb4em18 1tR84 d2eb4em18 1t
R84 d2eb4em18 1t
 
CodeRage XI international Conference: Arduino + Delphi Mobile Apps
CodeRage XI international Conference: Arduino + Delphi Mobile Apps CodeRage XI international Conference: Arduino + Delphi Mobile Apps
CodeRage XI international Conference: Arduino + Delphi Mobile Apps
 
Arduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - BasicsArduino plus Delphi Mobile Apps - Basics
Arduino plus Delphi Mobile Apps - Basics
 
Arduino plus Delphi Mobile Apps - Beyond Basics
Arduino plus Delphi Mobile Apps - Beyond BasicsArduino plus Delphi Mobile Apps - Beyond Basics
Arduino plus Delphi Mobile Apps - Beyond Basics
 
Costruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCostruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minuti
 
UGM CAN PXI
UGM CAN PXIUGM CAN PXI
UGM CAN PXI
 
2015 02 28 DotNetSpain2015 Coding4Fun
2015 02 28 DotNetSpain2015 Coding4Fun2015 02 28 DotNetSpain2015 Coding4Fun
2015 02 28 DotNetSpain2015 Coding4Fun
 
Lcd display with proteus
Lcd display with proteus Lcd display with proteus
Lcd display with proteus
 
R4 b4ecmb 5g
R4 b4ecmb 5gR4 b4ecmb 5g
R4 b4ecmb 5g
 
ZKTeco iClock580 Bangladesh
ZKTeco iClock580 BangladeshZKTeco iClock580 Bangladesh
ZKTeco iClock580 Bangladesh
 
Bl lw085-specification-www.ttbvs.com
Bl lw085-specification-www.ttbvs.comBl lw085-specification-www.ttbvs.com
Bl lw085-specification-www.ttbvs.com
 
R84 d3fb3f 1t
R84 d3fb3f 1tR84 d3fb3f 1t
R84 d3fb3f 1t
 
OV7670 Camera interfacing-with-arduino-microcontroller
OV7670 Camera interfacing-with-arduino-microcontrollerOV7670 Camera interfacing-with-arduino-microcontroller
OV7670 Camera interfacing-with-arduino-microcontroller
 
2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight
 
Arduino camera interfacing OV7670
Arduino camera interfacing OV7670Arduino camera interfacing OV7670
Arduino camera interfacing OV7670
 
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things
2015 06 11 Windows 10 Developer Readiness by MVPs - Internet Of Things
 
R4 d1fb3fcmb 5g
R4 d1fb3fcmb 5gR4 d1fb3fcmb 5g
R4 d1fb3fcmb 5g
 
Spec00313
Spec00313Spec00313
Spec00313
 
Ahd kit-0401 b
Ahd kit-0401 bAhd kit-0401 b
Ahd kit-0401 b
 

Similar to Introduction to PICAXE Microcontrollers

Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systemsarlabstech
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introductionANJUSHA R
 
student_pres120202final
student_pres120202finalstudent_pres120202final
student_pres120202finalJohn Marquis
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaRedis Labs
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginnersmohamed gaber
 
Microcontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PICMicrocontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PICSANTIAGO PABLO ALBERTO
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller Raghav Shetty
 
Codasip application class RISC-V processor solutions
Codasip application class RISC-V processor solutionsCodasip application class RISC-V processor solutions
Codasip application class RISC-V processor solutionsRISC-V International
 
Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Digital Bond
 
Webinar mdc i_kan_20170417 final
Webinar mdc i_kan_20170417 finalWebinar mdc i_kan_20170417 final
Webinar mdc i_kan_20170417 finalICPDAS
 
Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1Marcus Tarquinio
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi IntroductionMichal Sedlak
 
S2C China ICCAD 2010 Presentation
S2C China ICCAD 2010 PresentationS2C China ICCAD 2010 Presentation
S2C China ICCAD 2010 Presentationsrpollock
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...Alexandre Moneger
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONLyon Yang
 
[Advantech] PAC SW Multiprog Tutorial step by step
[Advantech] PAC SW Multiprog Tutorial step by step [Advantech] PAC SW Multiprog Tutorial step by step
[Advantech] PAC SW Multiprog Tutorial step by step Ming-Hung Hseih
 

Similar to Introduction to PICAXE Microcontrollers (20)

Basics Of Embedded Systems
Basics Of Embedded SystemsBasics Of Embedded Systems
Basics Of Embedded Systems
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introduction
 
student_pres120202final
student_pres120202finalstudent_pres120202final
student_pres120202final
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginners
 
Microcontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PICMicrocontroladores: Programación con microcontrolador PIC
Microcontroladores: Programación con microcontrolador PIC
 
Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
Codasip application class RISC-V processor solutions
Codasip application class RISC-V processor solutionsCodasip application class RISC-V processor solutions
Codasip application class RISC-V processor solutions
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
Vlsi lab
Vlsi labVlsi lab
Vlsi lab
 
Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4
 
Webinar mdc i_kan_20170417 final
Webinar mdc i_kan_20170417 finalWebinar mdc i_kan_20170417 final
Webinar mdc i_kan_20170417 final
 
Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
S2C China ICCAD 2010 Presentation
S2C China ICCAD 2010 PresentationS2C China ICCAD 2010 Presentation
S2C China ICCAD 2010 Presentation
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCON
 
[Advantech] PAC SW Multiprog Tutorial step by step
[Advantech] PAC SW Multiprog Tutorial step by step [Advantech] PAC SW Multiprog Tutorial step by step
[Advantech] PAC SW Multiprog Tutorial step by step
 

More from L. Paul Verhage

Autumn 2016 Easy Star Gazing
Autumn 2016 Easy Star GazingAutumn 2016 Easy Star Gazing
Autumn 2016 Easy Star GazingL. Paul Verhage
 
Near Space for Hams for Northwest APRS 2016
Near Space for Hams for Northwest APRS 2016Near Space for Hams for Northwest APRS 2016
Near Space for Hams for Northwest APRS 2016L. Paul Verhage
 
Get Involved with BalloonSat Classes
Get Involved with BalloonSat ClassesGet Involved with BalloonSat Classes
Get Involved with BalloonSat ClassesL. Paul Verhage
 

More from L. Paul Verhage (6)

Autumn 2016 Easy Star Gazing
Autumn 2016 Easy Star GazingAutumn 2016 Easy Star Gazing
Autumn 2016 Easy Star Gazing
 
Near Space for Hams for Northwest APRS 2016
Near Space for Hams for Northwest APRS 2016Near Space for Hams for Northwest APRS 2016
Near Space for Hams for Northwest APRS 2016
 
Meteor Showers
Meteor ShowersMeteor Showers
Meteor Showers
 
Robotics Introduction
Robotics IntroductionRobotics Introduction
Robotics Introduction
 
Easy Star Gazing
Easy Star GazingEasy Star Gazing
Easy Star Gazing
 
Get Involved with BalloonSat Classes
Get Involved with BalloonSat ClassesGet Involved with BalloonSat Classes
Get Involved with BalloonSat Classes
 

Recently uploaded

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Recently uploaded (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

Introduction to PICAXE Microcontrollers

Editor's Notes

  1. I’d like to talk about my favorite microcontroller, the PICAXE. I like it for two major reasons. First, its cheap, only a few dollars for the smallest type And second, its programmed in BASIC. So the learning curve to using them is very shallow. The PICAXE was developed after the BASIC stamp and has many similarities.
  2. PICAXE is a family of programmable microcontrollers from the UK company, Revolution Education. Each PICAXE is a PIC microcontroller programmed with a communications program and BASIC interpreter. The user programs the PICAXE in BASIC using the PICAXE programming Editor. Like a word processor, the Editor lets you type code, save the program in a text file on the PC, and checks the program for syntax errors. When a program is syntactically correct, the Editor allows the user to download the program into the PICAXE connected to the PC. The program is downloaded over a three wire serial port. The three connections in the serial cable are ground, signal in and signal out. The user created program is stored in the PICAXE’s internal memory. PICAXEs do not store their program in a separate memory chip like the BASIC Stamp. After having received the program or when the PICAXE is powered up, the PICAXE’s interpreter begins executing the instructions stored in its EEPROM memory, one command at a time.
  3. There are six types of single-chip PICAXE microcontrollers that I want to discuss. The name given to the variations of PICAXE microcontrollers is based on the number of I/O pins on the IC and it generation. The smallest is the PICAXE-08M2 and it looks like an eight-pin 555 IC. Some have called the PICAXE-08 the 21 st century 555 timer. I want to mention the voltages, ability to execute multiple programs, and clock speeds of these six microcontrollers. Voltages
  4. First, both the M2 and X2 series operate at 5 volts but can operate down to 1.8 volts. This permits you to create applications that don’t require a voltage regulator. Clock Speed M2 has an internal 4 MHz oscillator, but it can be clocked up to 8 times faster, or to a speed of 32 MHz. X2 has an internal 8 MHz oscillator, but can be clocked twice as fast, or 16 MHz.
  5. Both variations can operate multiple programs, but in different ways. The M2 series can run either two or four programs in semi-parallel. Semi-parallel execution means each program gets a turn executing a single command. Commands waiting for input and without time outs can stall the switching between programs. The programs are stored in a single program slot.
  6. The X2 series stores programs in separate slots. It uses the RUN command to switch execution between two or four program slots.
  7. Finally there clock speeds. The M2 series has an internal 4 MHz oscillator, but it can be clocked up to 8 times faster, or to a speed of 32 MHz.
  8. The X2 has an internal 8 MHz oscillator, but can be clocked twice as fast, or 16 MHz.
  9. I/O pins are the microcontroller’s access to the real world. The I/O pins detect binary states where a logic low is less than 1.4 volts and a logic high is above 1.4 volts. Several I/O pins can handle analog voltage using the READADC command The PICAXE-08M2 has only a bank C of six I/O pins while The PICAXE40X2 has four banks of eight I/O pins. Its banks are A, B, C, and D. Most pins can be used as both input and output while a few can only be configured to be just input or output The X2 series has pins that can be configured as hardware interrupts. The interrupts are not instantaneous however. Pins configured as hardware interrupts are scanned constantly in background. When the interrupt condition occurs, the interrupt flag of the PICAXE is set. The PICAXE does not check the interrupt flag until it executes the SETINTFLAGS command. Both the M2 and X2 series have a software interrupt that is established by the SETINT command. The command causes the PICAXE to scan selected pins for specified high and low conditions. When conditions are met, the PICAXE jumps execution to the specified subroutine.
  10. PICAXE microcontrollers have four types of internal memory, program, RAM, data, and scratch pad.
  11. First kind of memory is program memory. This is non-volatile memory and used to store user-created programs. The useful life of this kind of memory is predicted to be 10 years. The amount of memory depends on the specific microcontroller. The M2 series has 2k bytes of program memory. This is enough memory to store a program over 1,000 lines long. The X2 series has 4k bytes of program memory. However, the memory is arranged in slots. The X2 series chips have either one or four slots of program memory and there are commands to switch between slots. In addition, some X2 PICAXE microcontrollers allow you to add up to an additional 32 external program slots using I2C memory chips.
  12. The second type of memory is RAM memory and its used to store variables used in math and I/O. The lower level of RAM is accessed in bytes by their names. Some of the bytes can also be accessed at the bit and word level. The M2 series has up to 512 bytes of RAM. The first 28 bytes are named B0 to B27 while the rest are accessed indirectly using the PEEK and POKE commands The X2 series has up to 256 bytes of RAM. The first 56 bytes are named B0 to B55 while the rest are accessed indirectly.
  13. The M2 series has a third type of memory called data memory. There is 256 bytes of data memory which is useful for storing sensor readings in datalogger applications and storing configuration settings. The memory is non-volatile and accessed at the byte level with READ and WRITE commands.
  14. The X2 series has a fourth type of memory called scratch pad memory. They have 1 kilobyte of scratch pad memory and it can be used to store serial data over the chip’s hardware serial port in background. The stored data string can be accessed later using the GET and PUT commands
  15. The PICAXE can read its input pins several ways. At the simplest level, at any time during a program, the state of a pin can be detected as being either high or low. In addition, the PICAXE can count the number of high to low transitions in an I/O pin over a specified length of time. It can also measure how long a pulse is held high. There are several ways to read serial-type data over the I/O pins. These include the following Serial data from speeds 600 baud to 64k baud Serial data from I2C devices at speeds of either 100 kHz or 400 kHz Analog voltages can be converted into their digital representation with either 8-bit or 10-bit resolution Seven bit value from infrared devices like television remotes And eight bytes of data from inexpensive radio devices
  16. The PICAXE can set its output pins in several ways. At the simplest level, the state of a pin can be set to high or low at any time in the program. In addition, a pin may be set high for a specified length of time. There are several ways to pulse an I/O pin and these include the following Send serial data from 600 baud to 64k baud Write to I2C devices at a speed of either 100 kHz or 400 kHz Play an embedded tune or musical note Send pulses to position a servo Send a seven bit value to infrared devices like television sets Send eight bytes of data through inexpensive radio devices
  17. Execution of a program can be altered or controlled unconditionally or conditionally with the following commands. The GOTO and GOSUB commands are unconditional branching commands. The FOR-NEXT command is a looping control command. DO-LOOPs repeat commands while or until a condition is met. The branching condition can be tested either as part of the DO or the LOOP statement. The UNTIL and WHILE sub-commands state the condition at which the do loop is repeated or broken. The IF-THEN command is a conditional branching command. Incorporating the ELSEIF statement allows the command to create additional branches for additional conditions. It also allows a single condition to result in the execution of several commands, or essentially subroutines. ON-GOTO branches to an address in the program based on the current value of a variable. SELCT-CASE conditionally executes code statements depending on the value stored in a variable. The command is useful as a replacement for nested IF-THEN statements. The BRANCH command jumps execution to a new location in the program based on the value of a variable. The location is indicated by the address name.
  18. This code snippet shows the three commands required to setup a PICAXE for communication with a I2C memory chip, to write values to memory, which in this example is the word hello, and to copy the stored data from I2C memory into RAM memory.
  19. This code snippet shows seven examples of commands used to communicate over a serial link. The first is the DEBUG command. When ever this command is executed, the PICAXE sends the current values in RAM variables. The next two examples illustrate sending messages and values over any I/O pin. The command indicates which I/O pin to use, the baud rate, and the text or values which must be stored in RAM variables. The following two illustrate the same thing, but this time the data is sent and received over the PICAXE’s programming port. The speed is only 4800 baud. The last three illustrate how a hardware serial port is setup for a PICAXE. The hardware serial port allows the PICAXE to receive serial data in background and dump it into scratch pad memory. The PICAXE can parse through the data at a later time.
  20. The POKE commands copies the value of one or more named RAM variables into unnamed RAM memory, or EEPROM. The command can copy data in bytes or words. The PEEK command does the reverse and copies one or more values from unnamed RAM memory into named RAM memory. The READ-WRITE commands do the same thing as PEEK and POKE, except data is copied into data memory, or EEPROM. The GET and PUT commands copy byte values to scratchpad memory.
  21. The Editor is only PC based, there is no Mac version. The Editor allows you to do the following Select the variant of PICAXE to be programmed Select the com port for programming Create source code in either text or flowcharts Generate desired command parameters with the use of wizards Check syntax Download source code into a PICAXE Simulate a program running in a PICAXE Debug code by placing DEBUG commands that return variable values Communicate the PICAXE through a serial terminal program
  22. The Editor can program any one of the PICAXEs. Therefore, you need to select which PICAXE will be programmed. One reason this is important s that not all commands and parameters are valid for every PICAXE. You select your PICAXE by clicking the Options button located at the top of the Editor. The Mode tab presents a drop down menu where you can select your PICAXE. The mode is sticky, so the next time the Editor is started, the previously selected PICAXE mode is in effect.
  23. Since most PCs and laptops do not have serial ports, most PICAXEs are programmed through a USB to Serial adapter. This can create a forest of serial ports on the PC. The Editor does not try searching all possible serial ports in order to find which one a PICAXE is hanging off. You must set the correct serial port for the Editor. The serial port is selected by clicking the Options button at the top of the Editor screen. Serial ports is found in the Serial Port tab. There you will find a drop down menu where you can select the proper serial port.
  24. The Editor is smart the way it displays programs. A comment followed by text is displayed in green. Comments are not downloaded into the PICAXE. Commands are displayed in blue text. Program labels are displayed in black text. Labels in the program must end in a colon, but labels used in commands do not end in colons. I/O pins and variables are displayed in purple. The Editor edits text like a word processor. So you can find characters, copy, paste, and make global replacements.
  25. A second way to create a program is to use a flowchart. This graphical version of a program requires more space to display and can be converted into a text version of the program.
  26. Wizards help you set up parameters for specific commands. Wizards are found under the PICAXE option. There are two wizards related directly toe PICAXE programming, ring tones and PWM output. In addition, there are wizards for converting a program into one that runs on an X2 version of a PICAXE and for converting serial data into TCP/IP data for remote programming a PICAXE.
  27. Clicking the Syntax button checks over the current program in the Editor. This verifies that the program is correctly written for the PICAXE version specified in Mode. This does not verify that the program will work as desired. It only verifies that the code can operate in the PICAXE.
  28. The Program button opens communication with the PICAXE connected to the serial port selected in Mode. Once communications have been established, the program is downloaded into the PICAXE. The PICAXE verifies with the Editor that it properly received the program. A graphic is displayed that indicates how much progress has been made in downloading the program. If there is an error, the Editor warns you that communications with the PICAXE has failed. After the program is correctly downloaded, the Editor notifies you and indicates how much memory the program requires.
  29. Prior to downloading a program, you can simulate the operation of the program by clicking on the Simulate button. In the background is the text of the program which shows the currently executing line highlighted in a blue block. Three additional windows open up. The first windows displays the values of the variables in the PICAXE memory and the status of each I/O pin. You can set pins high or low by clicking its icon. In addition, you can enter analog voltage values for each of the pins capable of using the READADC command. The second window is a memory map. It displays the byte values of addresses in three types of memory. These are EEPROM memory which is accessed with READ and WRITE commands, RAM which is addressed directly or indirectly with PEEK and POKE commands, and Scratchpad memory which is accessed with GET and PUT commands. The last wind displays serial data that the PICAXE may generate.
  30. Programs can be debugged live. By leaving the PICAXE connected to the PC and using the DEBUG command, your program will display the current values stored in RAM. The Debug window opens as soon as the program is downloaded to the PICAXE. The window displays the values in each byte in binary, decimal, hexadecimal, and ASCII. In addition, RAM memory values is also displayed in words. The last thing displayed in the Debug window is the values in several PICAXE registers.
  31. Another feature of the Editor is its terminal program. The terminal displays serial data sent by any microcontroller. The PICAXE uses the SEROUT command to send serial data through any of its I/O pins that can be used as an output. One parameter of the SEROUT command is the baud rate. The terminal program can read serial data at ten different baud rates. You just need to make sure the terminal’s baud rate matches the baud rate of the PICAXE’s SEROUT command.