Created Mon, 10 Jun 2013 15:45:40 +0000 by alnath
Mon, 10 Jun 2013 15:45:40 +0000
Hi u all :)
I'm using a GSM shield, and it works fine, but it is hard to debug my sketch, because I can't use the software serial library as I could with arduino. The GSM shield has jumpers that allow to switch the serial RxTRx pins from pin0/pin1 to pin7/pin8 (pins that can be defined for softwareserial functions) .... unfortunately, Chipkit Uno32 2nd UART port uses pin39 and pin40 !! Then, my question is : would it work if I placed the jumpers of the shield to use pin7 and pin8 instead of pin0 and pin1 , and, if I wired togetherpin39 -> pin7 and pin40->pin8 on the Uno32 ? If yes, in which state should I configure pin7 and pin8 in the sketch ??
Another good point if it worked : it would allow me to upload the sketch without removing the shield, as I must do now, because the upload stops if I don't :?
Thanks for any answer :D
jf
Tue, 11 Jun 2013 09:52:08 +0000
hi again,
I answer to myself...in case somebody else has the same question, for this or another shield : I tried, and it works ! I didn't declare anything for pin7 and pin8 in the sketch. Put a wire between 7 and 39 , another one for 8 and 40 , and use Serial1
Sure it's only for debugging time, because it uses 6 pins where only 2 are required ;) , but it's helpfull and, as pins 0 and 1 are not used by the shield, no need to remove the shield each time I upload the mdified sketch.
hope this will help some of you :)
jf
Tue, 11 Jun 2013 10:14:22 +0000
All pins default to input mode (which is a "high impedance" mode) so shouldn't affect the serial signal adversely. It would even be possible to "snoop" on the serial signal using those pins should you so wish - could be handy for debugging ;)
Be careful that you never set those pins as output though, or you could fry the chip. You might be better off doing the link with some low value resistors (100Ω or so) just to limit the amount of current that could flow between the pins should a sketch set the pins to output at some point in the future (when you've forgotten what you did ;) )
Tue, 11 Jun 2013 13:51:15 +0000
Thank you Majenko, especially for the wise advice :) I didn't think I could fry the chip if I set the pins as output, I thought all pins had limiting resistors, but only analog ones actually have a 200Ω limiting resistor. Fortunately, I first tried with the default mode for the pins, and it worked ! but I'll try with 100 Ω resistors right now, just in case.... ;)
Tue, 11 Jun 2013 14:13:59 +0000
If you connect two pins together, and set them both as output with one high and one low you are effectively creating a direct connection between +3.3V and GND with two very small resistors. That would cause quite a large current to flow, which would cause the MOSFETs in the IO pins to go into meltdown breaking those two IO ports.
Tue, 11 Jun 2013 14:56:18 +0000
sure, you're right !