The Maximite BASIC "set pin" command is fantastic.
With one command and an integer between 1 and 9
you can configure all the pins according to this table.
Some micro- controllers take dozens of C or
BASIC commands to do this job. It becomes a nightmare.
Typically modern micro controllers have multiple functions for
the pins. Complicated gate structure on the die is cheaper than
having a zillion pins connected to the die. Most chips are limited
to 100 pins or so. Therefor configuring the pins is a major
part of programming micro controllers.
It is cheaper to put a bunch more gates on the die
to select pin functions than equip the chips with
a lot of pins. The Maximite chip has 39 I/O multi
function pins.
Typically modern micro controllers have up to
to about 100 pins. Some have more.
Example:
SetPin n, 9 'set pins 11 to 20 as open col 5 v output
FUNCTIONS
'0 Not configured or inactive
'1 Analog input (pins 1 to 10, A0 to A5)
'2 Digital input (all pins and 5V tolerant on pins 11 to 20)
'3 Frequency input
'4 Period input
'(pins 11 to 14)
'(pins 11 to 14)
'5 Counting input
'(pins 11 to 14)
'6 Interrupt on low to high input change (pins 1 to 20, D0 to D8) for
target
'7 Interrupt on high to low input change (pins 1 to 20, D0 to D8) for
target
'8 Digital output
'(all pins)
'9 Open collector digital output to 5V (pins 11 to 20, D0 to D13) In
this mode the
Paul Lamar
The Rotary Engine News Letter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
You Tube
http://tinyurl.com/beqqxas
Copyright 1998-2015 All world wide rights reserved.