Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Problems reading io pins as a group (http://www.chiefdelphi.com/forums/showthread.php?t=25096)

Mark McLeod 13-02-2004 09:35

Re: Problems reading io pins as a group
 
Quote:

Originally Posted by Random Dude
Mark, if you notice, tested his code on the EDU controller, where PORTA0-3, is bits 1-4

emusteve is doing his testing using the EDU controller, so that isn't it.
That is a good caution to others who might be reading this thread though.

He may have discovered his problem by now though.

emusteve 13-02-2004 13:42

Re: Problems reading io pins as a group
 
Yes, YES! I got it to work last night.

Thanks for all the comments and help! As it turns out, the original statement was working, the problem was apparentlywith the way I was trying to view the result through a printf statement. Still not sure what I was doing wrong there, as when I substituted a pwm variable I would get a real number. In frustration, I ended up echoing the result to a set of output pins, and there it was!

For those who are curious, I am using the "& 0x0f" as a mask to keep only the lower 4 bits. What I'm doing is implementing an outboard i/o expansion scheme so we can read numerical values from outboard hardware. PORTA will translate to PORTH on the FRC. For those who are interested, e-mail me directly and I'll be happy to share schematics and code (once I get the code finished). If there is enough interest, I'll post it as a white paper.

Thanks Again,
Steve Martin
smartin@emich.edu


All times are GMT -5. The time now is 23:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi