- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Working with board -059, I am trying to join two output pins (digital outputs) in order to feed more current to a sensor (ganed pins):
The C code I write is the following:
When I download the code to the -059 board, without connecting together both pins, only one pin outs the pulsed signal (0-5 v), and the other signals always 0v.
When I connect both pines together, the signals is just 0-2.5 v...
What am I missing?. Am I properly calling every pin on the c code? My intention is to get a single ganged signal pulsed with 0-5 v.
Thanks for the answer
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1/ Do I have to replace the initial code by yours, within the for loop?.
2/ Just add your code? If so, where?.
Please replace your code " Pin_Write(1); " with "Pin_Write(3);".
Because if you ganged the two sensors, you should use two bits to control it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Modify: Pin_Write(1); to Pin_Write(3);
You can check the source code :
void Pin_1_Write(uint8 value)
{
uint8 staticBits = (Pin_1_DR & (uint8)(~Pin_1_MASK));
Pin_1_DR = staticBits | ((uint8)(value << Pin_1_SHIFT) & Pin_1_MASK);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good morning LinglinhG_46, thanks for the answer.
Sorry for the simple question, but I do not know what to do with your code:
1/ Do I have to replace the initial code by yours, within the for loop?.
2/ Just add your code? If so, where?.
Thanks for the help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1/ Do I have to replace the initial code by yours, within the for loop?.
2/ Just add your code? If so, where?.
Please replace your code " Pin_Write(1); " with "Pin_Write(3);".
Because if you ganged the two sensors, you should use two bits to control it.