Default I/O; Reading Analog Channel 5 - FIGnition FUZE Hardware Reference Manual

Table of Contents

Advertisement

16 38 ic! <exe>
Using Forth, for example it's easy to write blinky, the standard embedded "Hello World"
program.
: blinky ( speed)
begin
16 38 ic! ( toggle the LED)
dup pause ( wait a little while)
inkey until
drop
;
Typing, for example:
for NTSC FIGnitions) until you press a key.

9.2.2 Default I/O

The following pins are free for using with an Arduino Shield. You can set them up as digital
inputs or outputs and control them from Forth.
Arduino
AVR
Header
Port
Name
Digital 0
PortD
0
Digital 5
PortD
5
Analog
PortC
5
5

9.2.3 Reading Analog Channel 5.

FIGnition can read analog ports by simply connecting an analog input to Pin 28. Here the
reference voltage will be Vcc. The adc can measure voltages with smaller voltage steps if
you choose a different reference voltage <Vcc by connecting AVRef to a different refer-
ence voltage.
7 blinky <exe>
Forth Setup as output
1 $FE $2A >port> drop
32 $DF $2A >port> drop
32 $DF $27 >port> drop
will make the led blink at about 3Hz (about 4Hz
Forth output.
1 $FE $2B >port> drop
0 $FE $2B >port> drop
set or reset the pin.
32 $DF $2B >port> drop
0 $DF $2B >port> drop
set or reset the pin.
32 $F7 $28 >port> drop
0 $F7 $28 >port> drop
set or reset the pin.
or
to
or
to
or
to

Advertisement

Table of Contents
loading

Table of Contents