Quick Start Guide
Let's make sure your Mizar32 works OK. You will need:
- A Mizar32 base board (any model: A, B or C)
- A micro SD card
- A PC that can read and write the SD card (you will probably need a micro-to-normal-size SD card adapter or a micro-SD-to-USB adapter to do this)
- A PC-to-Mizar32 micro USB 'mini-B' lead like the ones used with most phones or a 7.5V power supply.
Apply power to the Mizar32
The Mizar32 base board can be powered in two different ways: from its USB socket or from its DC power jack. There is a three-pin header on the main board, "
JP1", just behind the user button "SW2", which selects the power source that the Mizar32 will run from.
One option is to power the Mizar32 from your PC via a USB cable plugged into the Mizar32's USB connector "
J2". To take power from here, the jumper on
JP1 needs to be on the two pins furthest from the power jack, pins 1 and 2, which are the pins on the right when you are looking at the board from the side of the power socket and user button.
Alternatively, you can use an external power supply plugged into the power jack "
J1". In this case,
JP1's jumper needs to be connecting the two pins closest to the power jack (pins 2 and 3).
- The external power voltage needs to be at least 7.4 volts but can be anything up to 35V. The centre pin of the power connector needs to be the positive one but the Mizar32 will not be damaged if you accidentally get the positive and negative connections the wrong way round.
- The current needed by the base board is 80 milliAmps. The serial board takes another 5mA, the ethernet board 50mA, the LCD display 7mA and the VGA board 80mA.
When the Mizar32 is correctly powered and the jumper is in the right position, a red light on the main board will be lit next to the user button "
Program the Mizar32 to flash its on-board LED
Let's try running a little program on the Mizar32 to make sure everything is working correctly. This should make it flash the blue light next to the red power light.
If you're using Lua as your language on the Mizar32, then try this:
On your PC, use a text editor to create a file called "
autorun.lua" containing this:
-- Which led to blink? led = pio.PB_29 -- A simple delay function function delay() tmr.delay( 0, 500000 ) end -- Set the led in output mode pio.pin.setdir( pio.OUTPUT, led ) -- Blink led infinitely while true do pio.pin.setlow( led ) delay() pio.pin.sethigh( led ) delay() end
If you're using PicoLisp on your board, create a file called "
autorun.l" with the following content:
# Which led to blink? (setq led 'PB_29) # A simple delay function (de delay () (tmr-delay 0 500000) ) # Set led in output mode (pio-pin-setdir *pio-output* led) # Blink led infinitely (loop (pio-pin-setlow led) (delay) (pio-pin-sethigh led) (delay) )
Now, copy the file to a micro SD card. "Safely remove" the SD card and put it in the Mizar32's SD card slot. Now, when you apply power to the Mizar32 (or when you press its Reset button,
SW1), the blue LED next to the red one should start flashing once per second.
Now you know how to supply electrical power to the Mizar32 and how to write a program for it, load it onto the board and make it run. If this example didn't work for you, please contact us and we'll find out why.