Low-active port reading not possible even by simulation

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time

Low-active port reading not possible even by simulation

Post 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
Last edited by Huib Koppers on Thu Aug 26, 2010 4:05 pm, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time

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

Post 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.

Post Reply