We are experiencing high volumes, online orders are 2-8 weeks lead time.

PICAXE Hello World

Posted by Henry 12/06/2018 0 Comment(s) App Notes,

PICAXE-HelloWorld

 

This is a very fast simple example getting an PICAXE-28X2 Shield displays on a Matrix Orbital I2C LCD, I2C OLED or I2C VFD. A very quick Hello World demo with an ASCII counter.

 

;PICAXE with a Matrix Orbital I2C display Demo

;Created by Matrix Orbital, 12/6/2018

;web: www.matrixorbital.com

;support: support@matrixorbital.ca

 


 

symbol COUNTER = b1     ;create the COUNTER variable

COUNTER = 0      ;set COUNTER variable to 0

 

hi2csetup i2cmaster,$50,i2cslow,i2cbyte     ;set up i2c master for LCD, I2C address of $50, I2C Slow, I2C Byte

 

main:

 

      hi2cout ($FE)     ;Display command prefix


      hi2cout ($58)     ;Clear screen Command 

      hi2cout ("Hello World ASCII: ")     ;output text

      hi2cout (COUNTER)      ;output COUNTER variable


      inc COUNTER     ;incriment COUNTER variable 

      pause 250      ;pause 250ms

      goto main

 

end

 


 

What you will see on the screen on start is “Hello World! ASCII:  0” The ASCII is showing the ASCII/FONT table of the display starting at 0x30 which is ASCII “0”

 

 

Things to note:

  1. The PIXAXE-28X2 Shield needs the  I2C 4.7k  pull up resistors installed
  2. Default address of Matrix Orbital I2C LCD, VFD or OLED displays is hex 50