>That works !!! :) A big thanks to Keith and Mike :)
Good; glad to here you got it working.
>*sigh* There is just one thing, need to negate DIO.
>
>Example:
>"4" : D=0 C=1 B=0 A=0
>I must swap 0 to 1 and 1 to 0 and send as input D=1 C=0 B=1 A=1 to have
>my "4" digit.
>Is there any simple way to fix that ?
Sure; do it in software. Assuming you know the C language, and have tried
some of the simple test programs in this list's Files section, you should
know how to write to an I/O port on the TS-72xx. So:
volatile unsigned int *portA;
unsigned int theData;
// Want to turn on display segments A, B, and D, assumed
// to be bits 0, 1, and 3.
theData = 0x000b; // 00001011 (ignoring high bits)
theData = ~theData; // Invert all bits = 11110100 (ignoring high bits)
*portA = theData; // Write the data
Needless to say, there's more you could/should do, like masking off the
extra bits, or maintaining the state of other bits on the port you don't
want to disturb.
Example:
To mask bits 4-7: theData &= 0x0000000f; // Mask is 00001111 (ignoring
high bits)
Mike
------
Mike Dodd - Montpelier, VA
http://www.mdodd.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|