Hey guys,
From time to time we get questions about how to properly use the DIP switches with the MOD54415 and I'm sure we'll get a few about how to use them with the MOD54417 since the pinout is the same. On the other platforms, the DIP switches on the MOD-DEV-70 are attached to GPIO lines on J2, in the low numbered pins, 6-13 or so. With the MOD5441X platforms however, these pins were made to be ADC and DAC pins to allow a larger number of people looking for those modules to develop with it. This means that if you want to use the DIP switches on the dev board, you need to basically make faux digital input with the ADC module. We've done this for the ReadSwitch() function in the factory demo. If you want an example of how to do this for other projects, look at the webfuncs.cpp file.
From a software standpoint, all that is taken care of, but this is a hardware topic right? Well, to use the A/D on the Dev-70, your board also needs to be configured to use the A/D module. More specifically, this means you need to set the analog reference power and reference ground. On the MOD-DEV-70 Rev 1.9 and up, this is simple, we've added two jumpers JP5 and JP6 that you just need to close to connect J2_5 to 3.3V and J2_14 to ground respectively. If you're running any other version of the MOD-DEV-70, jumpering wires from J2_5 to J2_2 and J2_14 to J2_1 will do the same thing.
Using the DIP switches on the MOD-DEV-70 with the MOD54415
Re: Using the DIP switches on the MOD-DEV-70 with the MOD544
Another note here, if you're using the MOD5441X with the MOD-DEV-70 and you want to read voltages that are not the switches on the A/D, you'll need the switches to be in the ground position, that is all switches are up when the board is rotated so that the text is right side up. In this position J2_6-J2_13 are connected through 1k resistors to ground instead of connected directly to 3.3V. In this position, some current will flow through your resistors to ground, and in the other, whatever voltage you've connected to the lines will compete with the 3.3V and unless you're also driving the line with 3.3V, you're likely to damage something.
-
- Posts: 19
- Joined: Fri Sep 23, 2011 10:11 pm
Re: Using the DIP switches on the MOD-DEV-70 with the MOD544
Hi, I do appreciate the comments, but in the interest of clarity, which hardware revision(s) does the note apply to? There are quite a few board revisions, of each product line, and I could not understand from the description does it apply to legacy/current/future boards, or if there is a roadmap available to compare features. I've said this before: if one builds a hardware dependent upon a particular core module or development board, they need to have a product change notice process by Netburner (they registered with Netburner tech support with their serial number) so that if a product is being obsoleted, better plan for it soon.mbrown wrote:Another note here, if you're using the MOD5441X with the MOD-DEV-70
Re: Using the DIP switches on the MOD-DEV-70 with the MOD544
This note will apply to all versions of the MOD54415 (as of this writing rev 1.5-1.9 is the current field population) and MOD54417 (coming soon) running on a MOD-DEV-70 with DIP switches (I'm not aware of whether these were ever not on the boards -> current revision 1.93). We have no current plans to swap or reroute any of the ADC/GPIO lines that control or react to this behavior, but should something come up, I can come by here and tack a note or we'll have a product change notice about the part. Thanks for asking. Reading back it does seem a little ambiguous and I didn't mean it to be, it just applies to all cases that I can think of.
Re: Using the DIP switches on the MOD-DEV-70 with the MOD544
As the person who probably kicked this off at Netburner and pointed out that the MOD70 schematic on the web site did NOT match up to the hardware supplied with a MOD54415 DEv kit, let me try and add some clarity ...
I received my MOD54415 Dev Kits (2) in June 2014. The MOD54415 modules are Rev 1.9. The MOD70 board is Rev1.93.
At the time the web site had schematics for MOD70 Rev 1.6 in the 54415 section. This has now been fixed and the correct Rev 1.93 schematics can be downloaded.
LEDs
Previous versions of the MOD70 (eg Rev1.91 - which NB are still shipping with for example the MOD5270 Dev Kits), had J2-p17 and J2 -p18 connected to 2 of the 8 LEDs. On a MOD54415 these pins are used for the on chip USB modules and as such can only be used as GPIO INPUTS - so no good for the LEDs on the MOD70 Dev Board.
So on the current version of the MOD70 (Rev 1.93) these 2 LEDs can be re-routed to J2-p37 and J2-p31 by populating different positions for the 330R current limiting resistors.
(R24 instead of R9 and R25 instead of R11 as shown on schematics for Rev 1.93 of the MOD70)
So on a MOD54415 used with a Rev1.93 Dev Kit the LEDs are connected to (left to right on the board - LS Bit to MS Bit in software :
J2-15, J2-16 , J2-31 , J2-23 , J2-37 , J2-19 , J2-20, J2-24
This is configured in the Factory Demo App in the webfuncs.cpp file and WriteLeds function by the following line :
const BYTE PinNumber[8] = { 15, 16, 31, 23, 37, 19, 20, 24 };
The LEDs still have their Anodes connected to +3.3v and the cathodes to the GPIO pins via a 330ohm resistor (so 6 to 7mA out of the I/O pin through the LED - a bit high for continuous operation - but obviously works fine).
I guess if you are using any other MOD on the Rev1.93 MOD70 you should have R9 instead of R24 and R11 instead of R25 populated (these are 3 pad resistor links on the board so you can only have one of each resistor fitted! Although I think the LEDs will work fine on other modules using p31 and p37, but you might have to change the PinNumber constant definition in the Factory App. If the 3rd and 5th LED (from the left) don't work - suspect this issue.
SWITCHES
As Mike has said on the MOD70 the switches are connected to J2-6 to J2-13. On other modules these are GPIO pins, but on the 54415 these are the 8 A/D input channels. The problem I had with this is that out of the box the Analogue Reference voltage for the on chip A/D was unconnected (floating) so on the Factory Demo the switches didn't work (changing one switch might make 3 change state, or nothing happen!)
JP5 (to connect +3.3v to J2-p5) and JP6 (to connect Gnd to J2-p14) need to be made (linked 1 to 2). (They did not supply spare links for this!)
Slightly confusingly when the switches are closed (ON) the web page reports "OFF" and vica versa. I guess this is a hang over from the original code that simply read GPIO and it's easily changed (but that's a software issue and this is a hardware forum!!)
Important NOTE - as far as I can see NB have changed the web site such that the link to download the MOD70 schematics in all Modules sections is now linking to the Rev 1.93 version of the MOD70. Be Warned, this might not be what you receive. At the same time as buying the MOD54415 Dev Kits, I bought a MOD5270 Dev Kit and it came with a Rev1.91 MOD70 which does not have the option to use J2-31 and J2-37 on the LEDs so is not suitable for the MOD54415. So check your board Revisions carefully.
I don't know if this is deliberate or just a mistake, but NB guys, you should check this out ...
I hope that helps some new MOD54415 users ...
I received my MOD54415 Dev Kits (2) in June 2014. The MOD54415 modules are Rev 1.9. The MOD70 board is Rev1.93.
At the time the web site had schematics for MOD70 Rev 1.6 in the 54415 section. This has now been fixed and the correct Rev 1.93 schematics can be downloaded.
LEDs
Previous versions of the MOD70 (eg Rev1.91 - which NB are still shipping with for example the MOD5270 Dev Kits), had J2-p17 and J2 -p18 connected to 2 of the 8 LEDs. On a MOD54415 these pins are used for the on chip USB modules and as such can only be used as GPIO INPUTS - so no good for the LEDs on the MOD70 Dev Board.
So on the current version of the MOD70 (Rev 1.93) these 2 LEDs can be re-routed to J2-p37 and J2-p31 by populating different positions for the 330R current limiting resistors.
(R24 instead of R9 and R25 instead of R11 as shown on schematics for Rev 1.93 of the MOD70)
So on a MOD54415 used with a Rev1.93 Dev Kit the LEDs are connected to (left to right on the board - LS Bit to MS Bit in software :
J2-15, J2-16 , J2-31 , J2-23 , J2-37 , J2-19 , J2-20, J2-24
This is configured in the Factory Demo App in the webfuncs.cpp file and WriteLeds function by the following line :
const BYTE PinNumber[8] = { 15, 16, 31, 23, 37, 19, 20, 24 };
The LEDs still have their Anodes connected to +3.3v and the cathodes to the GPIO pins via a 330ohm resistor (so 6 to 7mA out of the I/O pin through the LED - a bit high for continuous operation - but obviously works fine).
I guess if you are using any other MOD on the Rev1.93 MOD70 you should have R9 instead of R24 and R11 instead of R25 populated (these are 3 pad resistor links on the board so you can only have one of each resistor fitted! Although I think the LEDs will work fine on other modules using p31 and p37, but you might have to change the PinNumber constant definition in the Factory App. If the 3rd and 5th LED (from the left) don't work - suspect this issue.
SWITCHES
As Mike has said on the MOD70 the switches are connected to J2-6 to J2-13. On other modules these are GPIO pins, but on the 54415 these are the 8 A/D input channels. The problem I had with this is that out of the box the Analogue Reference voltage for the on chip A/D was unconnected (floating) so on the Factory Demo the switches didn't work (changing one switch might make 3 change state, or nothing happen!)
JP5 (to connect +3.3v to J2-p5) and JP6 (to connect Gnd to J2-p14) need to be made (linked 1 to 2). (They did not supply spare links for this!)
Slightly confusingly when the switches are closed (ON) the web page reports "OFF" and vica versa. I guess this is a hang over from the original code that simply read GPIO and it's easily changed (but that's a software issue and this is a hardware forum!!)
Important NOTE - as far as I can see NB have changed the web site such that the link to download the MOD70 schematics in all Modules sections is now linking to the Rev 1.93 version of the MOD70. Be Warned, this might not be what you receive. At the same time as buying the MOD54415 Dev Kits, I bought a MOD5270 Dev Kit and it came with a Rev1.91 MOD70 which does not have the option to use J2-31 and J2-37 on the LEDs so is not suitable for the MOD54415. So check your board Revisions carefully.
I don't know if this is deliberate or just a mistake, but NB guys, you should check this out ...
I hope that helps some new MOD54415 users ...
Gavin Murray