Hi Ryan7777;
Try to add this 2 lines after the INTCON configuration and see if it works.
TRISA = %00000000
TRISB = %00000000
Hi Ryan7777;
Try to add this 2 lines after the INTCON configuration and see if it works.
TRISA = %00000000
TRISB = %00000000
Thanks and Regards;
Gadelhas
Hi Ryan7777;
Have you allready tried my sugestion?
I've tried and it worked, so you must add those to lines that i mention.
Also remember that you are working with binary numbers, so this;
will not light up all the leds.Code:DataOut=DataOut+1 if dataout >=8 then
Thanks and Regards;
Gadelhas
Oh hey, Thanks! You're exactly right the set up of my ports was the snag. I was also confused with the dataOut= and the pins on the port expander being addressed as a binary number (1,2,4,8,16,32,64,128). My first go after after setting up TRIS, the port expander was counting up in binary and of course stopping because of the if dataOut >=8 then bit of code. I fixed all of that and tossed together some quick, sloppy code using a couple of FOR NEXT loops and SELECT CASE structure to get it to count up and down in proper fashion to scan the LEDs one at a time up PORTA and back down. So if I wanted to play "night rider", now I all I'd need is a black firebirdNow I feel like a have a good grasp on how to talk to the MCP23S17 for the project I had originally intended it for. Thank you for the fast replies and for posting your tutorial on this part! I'll post my "blinky" code when I get back to my real PC.
Thanks again!
Ryan
Bookmarks