IO pin response times

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

IO pin response times

Post by YahooArchive »

Gentlemen ; I'm wondering about the latency aspect of placing data on output
pins OUTx=1 and how long the data remains on the selected pin .
I'm assuming that it stays there until changed by another OUT command .

My current project is set up like an old style 8 bit bus using I/O pins 0 thru 7
, a bit address bus using I/O pins 8 thru 11 and two pins used as a Chip Select
and Output Enable signals .

ALL I/O from the Armite are permanently Enabled buffers using 74LS244's . All
of my DATA PORTS are wired as outputs using 74HC573 Octal D flips to effectively
LATCH UP data to the ports . The Chip Selector is via a 74LS154 4 by 16 MUX and
is selected by the I/O pin 12. Output Enables for all of the Octal Flips are
commoned and driven from I/O pin 13 .

IN THEORY ; the set up should allow for outputting 8 bit data ,selecting an
apppropriate CS (port) and then latching up the data using the OE signal as both
the data and adressing would be guarenteed stable at this point . No such luck .
I'm getting copies of outputted data on all of the ports .

Perhaps I selected the wrong types of devices to use for this . Dunno. Tests
okay on the breadboard though .

Also , as I'm still a programming NEWBIE , is there a simple way to do decimal
to binary conversions and binary to BCD conversions ?

HELP

Rick



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: IO pin response times

Post by YahooArchive »

> Gentlemen ; I'm wondering about the latency aspect of placing data on output
pins OUTx=1 and how long the data remains on the selected pin .
> I'm assuming that it stays there until changed by another OUT command .

The pin in OUT(pin) = 1 will change within 500 nsec. It will stay that way
until changed again or the DIR is changed (note DIR must be set to 1 for the pin
to drive the output)

>
> My current project is set up like an old style 8 bit bus using I/O pins 0 thru
7 , a bit address bus using I/O pins 8 thru 11 and two pins used as a Chip
Select and Output Enable signals .
>
> ALL I/O from the Armite are permanently Enabled buffers using 74LS244's . All
of my DATA PORTS are wired as outputs using 74HC573 Octal D flips to effectively
LATCH UP data to the ports . The Chip Selector is via a 74LS154 4 by 16 MUX and
is selected by the I/O pin 12. Output Enables for all of the Octal Flips are
commoned and driven from I/O pin 13 .
>

I'm having a hard time following, a drawing would help. But what you are trying
to do is possible. I suspect making a drawing and checking against what you
hooked up would probably diagnose the problem.

> Also , as I'm still a programming NEWBIE , is there a simple way to do decimal
to binary conversions and binary to BCD conversions ?

digit1 = (something / 1000) mod 10
digit2 = (something / 100) mod 10
digit3 = (something / 10) mod 10
digit4 = (something) mod 10

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: IO pin response times

Post by YahooArchive »

In BASIC different keywords take different times

IO(x) will be the slowest as it always set's the GPIO port direction, before reading/writing the pin
IN(x) or OUT(x) will be faster, but there is overhead to handle the multiple ports

The fastest will be reading and writing directly to the PORT registers
FIO0SET = (1<<x)

z = FIO0PIN AND (1<<x)

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: IO pin response times

Post by YahooArchive »

Looking to read digital 8 bit values at 2000 hz from an analog
signal...possible? I want to store 5-10 readings, compute the average slope, and
output a calculated speed. Voltage level will also reset the program to read a
new speed.

Also have a serial LCD, that takes 9600 baud input, any help on this is
appreciated but I can probably figure it out. It needs 5V 10ma..can i take this
of the Armite at any point?

The other feature I need to implement is instantaneous switches that change
boolean values in the program...can i just loop between 2 pins with a 10k
resistor and the switch?

I will be using the C compiler.

Post Reply