Page 1 of 1

Low-active port reading not possible even by simulation

Posted: Thu Aug 26, 2010 10:16 am
by Huib Koppers
Hello,

Low-active push-button port reading is not working by simulation and also not working when downloaded to HW.

The LED's are configurated as low-active and even are the push-buttons.
I need this configuration on the AT91SAM7S256-EK because the push-buttons and LED's are configurated as "low-active"

I have included a test program which is made by ARM FC v4.

What i'm doing wrong ?

regards

Huib

Re: Low-active port reading not possible even by simulation

Posted: Thu Aug 26, 2010 11:27 am
by Benj
Hello Huib,

From looking at your program it looks like the code in the decisions is incorrect.

to get the values of the switches on bits D2 and D3.

Put the following into a desicion to test bit 2.

Code: Select all

x & 0x04
Put the following into a desicion to test bit 3.

Code: Select all

x & 0x08
For the inversion to work you have to use component macro calls to the switches and leds. Port I/O operation will remain uneffected.

Re: Low-active port reading not possible even by simulation

Posted: Thu Aug 26, 2010 12:40 pm
by Huib Koppers
Hello,

Problems have been solved by changing hardware configuration.

PortC which was driving the LCD, was interfering with serial communication and has now changed to PortA (0,1,2,3,4,5)

PortD which was reading the switches was interfering with ADC has now changed to PortB (0,1)

Probably the initialising for ADC and Serial communication was in FCv3 on a different way managed then in FCv4.

My mistake was to expect the same configuration in managing ports from the older version by FCv3 to the new version of FCv4.

Everything works again.