I am trying to manipulate SMTIO0-SMTIO3 but can't seem to get it working. If I try using the port name "SMTIO2:", I cannot open the port. If I use the wrapper class listed above I see no change on the I/O pins when I try to toggle them. Code snippet:
ADSmartIO gSmartIO;
gSmartIO.SelectOption(3); gSmartIO.InitDDRA(0x00); /* PAx = ALL INPUT */ gSmartIO.InitDDRB(0x00); /* PBx = ALL INPUT */ gSmartIO.InitDDRC(0xC0); /* PCx = PC0..5=INPUT, PC6,7=OUTPUT */ gSmartIO.InitDDRD(0x00); /* PDx = ALL INPUT */
gSmartIO.WritePortC(0xC0); // write 1's to PC6 & PC7
I am using Bitsy and never see the pins J3-35(PC6) or J3-37(PC7) change state. Is there something I am not doing correctly?
Also, can PD0 and PD1 be used as discrete input? Note above indicates that they can't be used as output, but doesn't indicate whether they can be used as input on Bitsy.
Thanks for your note, Craig. I think this post at topic 306 will help for details about availability of these ADSmartIO ports on the Bitsy. In short, they are probably not available for application use.