Per subject. There's guidance on how to do this with other products in the Technical Documents, but I couldn't find any for the SBL 2E.
Thanks.
SBL 2E - GPIO programming info
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: SBL 2E - GPIO programming info
You are right... the documentation is a little scanty. However if you look at the example folder, in the sub folder for the SBL2e, in the A2DSerial project, you will see the standard PinIO calls for initing pins 7 thru 10 to be A2D pins (instead of GPIO).
Pins[7].function(PIN7_AN0);
Pins[8].function(PIN8_AN1);
Pins[9].function(PIN9_AN2);
Pins[10].function(PIN10_AN3);
Next, take a look at C:\nburn\SBL2E\include\pinconstant.h and you will see the various options available for each pin: Uart lines, 12c, SPI, CAN, GPIO, A2D, etc.
If you don't know how to use the pincostant.h options, take a look at http://www.netburner.com/downloads/mod5 ... O-R1p1.pdf. Even though the appnote describes the 5270, the idea is just the same except that you use the pin constants defined for the appropriate platform, in your case those defined in the SBL2e's pinconstant.h file described above.
Pins[7].function(PIN7_AN0);
Pins[8].function(PIN8_AN1);
Pins[9].function(PIN9_AN2);
Pins[10].function(PIN10_AN3);
Next, take a look at C:\nburn\SBL2E\include\pinconstant.h and you will see the various options available for each pin: Uart lines, 12c, SPI, CAN, GPIO, A2D, etc.
If you don't know how to use the pincostant.h options, take a look at http://www.netburner.com/downloads/mod5 ... O-R1p1.pdf. Even though the appnote describes the 5270, the idea is just the same except that you use the pin constants defined for the appropriate platform, in your case those defined in the SBL2e's pinconstant.h file described above.
Re: SBL 2E - GPIO programming info
Rangeglider -
Appreciate the quick response. Are those header files part of the Development Kit? I can't find them anywhere in the Tech. Docs. I ordered a bare SBL 2E thinking all the stuff I would need to work with it was in the online manuals and documentation...
Appreciate the quick response. Are those header files part of the Development Kit? I can't find them anywhere in the Tech. Docs. I ordered a bare SBL 2E thinking all the stuff I would need to work with it was in the online manuals and documentation...
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: SBL 2E - GPIO programming info
Sounds like you wound up w/ the eval kt, not the dev kit...
Re: SBL 2E - GPIO programming info
Not even the eval. kit, just the bare device - SBL2e-100IR. I don't need the breakout board, I can make my own cables, etc.
On closer inspection, the SBL2e User's Manual has all the pin assignment stuff on pgs. 14 - 18. It wasn't clear until I looked at the datasheet again that the "pins" they refer to are on JP1. To me, coming from a component-level perspective, "pins" are the physical connections to a semiconductor device...
Just had to re-think things in a different light.
Thanks for giving me a kick in the right direction.
On closer inspection, the SBL2e User's Manual has all the pin assignment stuff on pgs. 14 - 18. It wasn't clear until I looked at the datasheet again that the "pins" they refer to are on JP1. To me, coming from a component-level perspective, "pins" are the physical connections to a semiconductor device...
Just had to re-think things in a different light.
Thanks for giving me a kick in the right direction.