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
Low-active port reading not possible even by simulation
Moderator: Benj
-
- 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
Last edited by Huib Koppers on Thu Aug 26, 2010 4:05 pm, edited 1 time in total.
- 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
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.
Put the following into a desicion to test bit 3.
For the inversion to work you have to use component macro calls to the switches and leds. Port I/O operation will remain uneffected.
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
Code: Select all
x & 0x08
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- 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
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.
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.