Hi all!
I´m an absolutely newbie to .NETMF programming and love to spent some time as a hobbyist on this platform. To be honest my personal programming experience lasts back to my university time when I was programming in Turbo Pascal and a little assembler... (which is more than 25 years ago)
I have some understanding of the C, C++ and even C#, read some books, did some small practice (and forgot many things, as I didn´t find the time to consecutively follow my trail aside of my job).
I bought a Netduino 2+ and for some trials a Nootropic design 4 digit shield, a Adafruit Motorshield and a luminosity sensor. Thanks to you guys I already found some porting for the motor control, but I´m struggling with the digit shield. It uses 4 pins and uses a timer interrupt controlled multiplexing. What I´ve understood so far from the Arduino library provided by Nootropic, is that the concept is based on using a shift register for the data (taking 1 pin), a clock pin, a latch pin and a control pin for decimal point on/off. Many of the inherited methods appear quite simple, but especially this timer issue is giving me headache. I have tried to figure out, whether and how this ISR concept could be ported ....but to be honest: I HAVE GOT NO CLUE
Has anyone played around with this shield yet?
Thx in advance from a desperate bloodie newbie.......
Hi Vol_Del,
First of all, I do not have the [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Nootropic design 4 digit shield you are talking about, however the technique used to write to the 4 digit shield is the same used in the Motor driver above your post. Both shields use a 74HC595 serial to parallel latch. Take a look at the: [/color]latch_tx(); method and the assignment: latch_state [color=rgb(102,102,0);]=[/color] [color=rgb(102,102,0);]([/color][color=rgb(0,0,136);]byte[/color][color=rgb(102,102,0);])(([/color]latch_state [color=rgb(102,102,0);]&[/color] [color=rgb(0,102,102);]0xBE[/color][color=rgb(102,102,0);])[/color] [color=rgb(102,102,0);]|[/color] [color=rgb(102,102,0);]([/color]direction [color=rgb(102,102,0);]?[/color] [color=rgb(0,102,102);]1[/color] [color=rgb(102,102,0);]:[/color] [color=rgb(0,102,102);]64[/color][color=rgb(102,102,0);]));[/color]
If you use a windows calculator (set to programmer mode) you will find that 0xBE translates into the bit pattern 10111110 in the code above either the first bit or the seventh bit is set. The latch_tx method is all you need to write the 8 bits to the 74HC595. For more information about the 74HC595 I recommend reading this article: http://arduino.cc/en/Tutorial/ShiftOut .
The other IC on the Nooptric shield will translate the binary pattern of the 74HC595 to the 7-segment display so you do not have to do that yourself.
Hope this helps you a bit.
One more thing to keep in mind is the use of pins when stacking shields on top of each other.
The Adafruit Motor shield uses quite a lot of pins. The information below might help you: