Jack Gassett

LogicStart Shield for the Papilio DUO

Recommended Posts

3 pins is nice, four would be awesome on an upward facing connector as it would be enough to play with SPI (MISO, MOSI, CLK, CS) or I²C external widgets. Is there any pin that could easily be shared/jumpered for this (eg losing/sharing an LED)

 

Actually, we should be able to make one of the switches work as dual purpose. I can add a header to the board with four pins to be connected to various electronic addons. What do people prefer though, a grove connector or just a standard .1" Male pin header?

 

Jack.

Share this post


Link to post
Share on other sites

.1 male header is what Ardweenies are used to (plus I guess wanting 5v/3.3v/0v the same way), grove is nice for 'wiring is hard' people - but if you really wanted grove you could easily pull the VGA wing off and add a grove wing could you not ?

Share this post


Link to post
Share on other sites

I don't really think there is a generic LogicNextStep. Everybody whats to do different things!

 

That is what I think as well. It's hard to make one mega shield that will please everyone, which is why I'm surprised that there hasn't been a bigger emphasis on wings, which was a big selling point in the old days of Papilio. With individual wings one could assemble exactly what they needed.

 

I still think it is useful to have specialized mega wings such as the arcade one for example but for learning purposes a collection of individual wings could be more suitable.

 

For example the logic megawing can be broken down to

  • an 8 bit wing with 4 sliders + 4 LED
  • an 8 bit wing with 4 sliders + 4 LED 
  • an 8 bit audio wing
  • an 8 bit wing with directional switches (or joystick)
  • a 16 bit VGA wing
  • a 16 bit wing with the 7 segment display

Then everyone's happy. You want alphanumeric displays, just replace the 7 seg wing with and alphanumeric one (once one is designed of course). Or maybe you want 8x8 dot matrix. No need for VGA, leave that wing off and you have more free pins available. Maximum flexibility.

 

Another useful widget might be a 8 bit wing to PMOD adaptor, either straight or right angle to open up the world of Digilent PMODs to the Papilio.

Share this post


Link to post
Share on other sites

That is what I think as well. It's hard to make one mega shield that will please everyone, which is why I'm surprised that there hasn't been a bigger emphasis on wings, which was a big selling point in the old days of Papilio. With individual wings one could assemble exactly what they needed.

 

I still think it is useful to have specialized mega wings such as the arcade one for example but for learning purposes a collection of individual wings could be more suitable.

 

For example the logic megawing can be broken down to

  • an 8 bit wing with 4 sliders + 4 LED
  • an 8 bit wing with 4 sliders + 4 LED 
  • an 8 bit audio wing
  • an 8 bit wing with directional switches (or joystick)
  • a 16 bit VGA wing
  • a 16 bit wing with the 7 segment display

Then everyone's happy. You want alphanumeric displays, just replace the 7 seg wing with and alphanumeric one (once one is designed of course). Or maybe you want 8x8 dot matrix. No need for VGA, leave that wing off and you have more free pins available. Maximum flexibility.

 

Another useful widget might be a 8 bit wing to PMOD adaptor, either straight or right angle to open up the world of Digilent PMODs to the Papilio.

 

I personally like this approach too, but the problem was that I was not able to make the Wings low cost enough. So it became too expensive for a full solution based on Wings... Maybe partnering with Uberclock to make less expensive Wings or finding someone who can run my pick and place would make this more feasible. Will have to think some more on it, the sad truth is that I wasn't able to support myself financially until I made the first MegaWing. That's when sales picked up enough that I was no longer living off credit cards... So the MegaWing concept seems to work while the Wing concept never had many sales.

Share this post


Link to post
Share on other sites

I just finished reworking the LogicStart Shield and added a header with the 3 free GPIO pins, 1 switch pin, 3.3V, and GND. 

 

Here is the change:

post-29509-0-13494700-1408122847_thumb.p

Share this post


Link to post
Share on other sites

Jack,

 

Adding current limiting resistors for the LEDs will fix one thing but you still have the problem with the drive transistors.

 

As coryjfowler and James1095 points out in this thread http://forum.gadgetfactory.net/index.php?/topic/1921-logicstart-megawing-7-segment-display-has-no-current-limiting/, the base of the digit drive transistors also lack current limiting resistors.  From the FPGAs (or AtMegas) pespective, the digit drive signals are connected to 3.3V via a diode and when pulled low it's only the internal current limiting in the FPGA or uController drive transistor that limits the current.  This is quite bad.

 

You also lack pullup resistors to 3.3V on the digit drive transistors base so when nothing is driving the base it's floating.

 

Magnus

Share this post


Link to post
Share on other sites

Jack,

 

Adding current limiting resistors for the LEDs will fix one thing but you still have the problem with the drive transistors.

 

As coryjfowler and James1095 points out in this thread http://forum.gadgetfactory.net/index.php?/topic/1921-logicstart-megawing-7-segment-display-has-no-current-limiting/, the base of the digit drive transistors also lack current limiting resistors.  From the FPGAs (or AtMegas) pespective, the digit drive signals are connected to 3.3V via a diode and when pulled low it's only the internal current limiting in the FPGA or uController drive transistor that limits the current.  This is quite bad.

 

You also lack pullup resistors to 3.3V on the digit drive transistors base so when nothing is driving the base it's floating.

 

Magnus

 

Hey Magnus,

 

Thank you for the help here, in the LogicStart MegaWing 2.1 design we used 390 ohm series limiting resistors on the digit drive transistors and it seemed to work really well when we built prototypes. Since the Papilio DUO has 390 ohm resistors on pins 0-14 I went ahead and eliminated the resistors from the LogicStart Shield and connected the digit drive transistors to pins 0-4. So it is not obvious from the schematic but there are 390 ohm resistors in series with AN0-AN4. One thing I missed though is the Atmega32u4 connects directly to pins 0-14 so the 390 ohm resistors do not come in to play if someone drives the 7 segment display from the ATmega32u4, no good. So it looks like I better move the AN0-4 pins somewhere else and put the series limiting resistors for the digit drive transistors back on the LogicStart Shield... I thought I had it covered but looks like I overlooked the ATmega32u4. 

 

Lesson learned, I better update the Papilio DUO shield template with notes that explain how the 390 ohm resistors on pins 0-14 come into play. They are between the FPGA and the pins but not the atmega32u4 and the pins...

 

I'll also add the pullup resistors...

 

Thanks again,

Jack.

Share this post


Link to post
Share on other sites

Hi,

 

>> I'll also add the pullup resistors...

aren't those bipolar transistors (instead of FETs)? If so, they have finite current gain around 100.

 

See "BF" in the spice model on page 2:

http://www.fairchildsemi.com/ds/MM/MMBTA56.pdf

http://ecee.colorado.edu/~bart/book/book/chapter5/pdf/ch5_6_3.pdf.

 

You may be able to save some pennies here. Those won't turn on without being driven 1 % of the LED current (which won't happen by hand-waving near open inputs).

An FPGA pull-up resistor would still be enough, though.

 

A circuit that I might use myself is an NPN transistor, collector tied to 3.3 V, base to the FPGA. At the emitter a current limiting resistor and the LED to ground.

It will always drop ~0.6 V over the transistor, needs a slightly smaller resistor.

Share this post


Link to post
Share on other sites

Hi all,

 

is it to late, or to costly, to add a DB-9 male connector, to be placed on parallel to the four directional buttons already provided, in order to connect an Atari standard joystick ?

 

I think it will be much more easy and useful having a true joystick to use, given also the fact that the old on-board mini joystick present on the current LogicStart Megawing has been tossed.

 

Any way, I've already added to my Papilio DUO pledge (that already included a Classic Computing shield, a case, and a set of wings), a new LogicStart shield  ;)

Share this post


Link to post
Share on other sites

Hi all,

 

is it to late, or to costly, to add a DB-9 male connector, to be placed on parallel to the four directional buttons already provided, in order to connect an Atari standard joystick ?

 

I think it will be much more easy and useful having a true joystick to use, given also the fact that the old on-board mini joystick present on the current LogicStart Megawing has been tossed.

 

Any way, I've already added to my Papilio DUO pledge (that already included a Classic Computing shield, a case, and a set of wings), a new LogicStart shield  ;)

 

Thank you for your support. :)

 

I'm going to be working on this design today, I'll see what can be done.

 

Jack.

Share this post


Link to post
Share on other sites

Ok, I tried to add a DB9 connector but it was too big... So I added a new header with the directional buttons broken out to a header.

post-29509-0-67066900-1408739803_thumb.p

 

Then I realized, why not just connect all of the switch pins to an 8 bit Wing slot, that way people can add the Joystick Wing or anything else...

post-29509-0-32867900-1408739881_thumb.p

 

So I changed it in favor of an extra 8-bit Wing.

 

I also moved the 7 segment transistor pins to a different location and added series current limiting resistors.

post-29509-0-66737100-1408740042_thumb.p

post-29509-0-68330000-1408740320_thumb.p

 

And NOW I think it is finally done...

 

Jack.

Share this post


Link to post
Share on other sites

wait. Those "current limiting resistors" look wrong.

There is nothing that limits the LED current itself. The base-emitter current is limited to maybe 10 mA (which is fairly high) but the transistor will be fully saturated and drop maybe 200 mV between collector and emitter.

 

What you can do as a quick reality check is to run the circuit from 12 V, hard-wire inputs to Vcc or GND.

If the circuit is designed correctly and "robust", you'll get three times the intended current => not a problem for a couple of seconds.

But I think you'll see magic smoke in this test.

Share this post


Link to post
Share on other sites

wait. Those "current limiting resistors" look wrong.

There is nothing that limits the LED current itself. The base-emitter current is limited to maybe 10 mA (which is fairly high) but the transistor will be fully saturated and drop maybe 200 mV between collector and emitter.

 

What you can do as a quick reality check is to run the circuit from 12 V, hard-wire inputs to Vcc or GND.

If the circuit is designed correctly and "robust", you'll get three times the intended current => not a problem for a couple of seconds.

But I think you'll see magic smoke in this test.

 

I didn't show the whole picture, there are still resistors on each of the segments that will limit the current for each segment to around 20mA. The resistors on the base of the transistor are protecting the FPGA pins. 

 

post-29509-0-31376000-1408998633_thumb.p

Share this post


Link to post
Share on other sites

good, makes sense.

BTW, I noticed the transistor needs a fairly high base current to saturate at 20 mA. Explains the low base resistors.

Share this post


Link to post
Share on other sites

Just a low-cost idea. Could a R-2R ladder chip be included as DAC for analog signal generation? If so, please include the lower resistor value, compatible with output current capacity,  for higher bandwidth.

Share this post


Link to post
Share on other sites

Hi Hamster

 

any chance you can quickly give us a minimal set of changes to Chapter 6 of your

Introducing the Spartan 3E FPGA and VHDL

book, to make the example work with the Papilio Duo and Logic Shield, using the Designlab IDE?

 

I realise you are planning to do the whole book, but a very brief summary of the changes here would help us get up and running. 

(I did try by myself, starting from the Logic Shield Project, and successfully created a bitfile, but something was wrong and it did not repsond to the switches, and I think I am just missing some fairly straightforward point).

 

[Also, could you put the ucf file for the Logic Shield online somewhere please?]

 

Thanks!

 

Ralph

Share this post


Link to post
Share on other sites

Found the ucf file. Thanks for the prompt response!

 

Anyway, this confirms whatever I was doing wrong, it wasn't to do with what I had put in my UCF file.

I had exactly lines exactly the same as in that for SW0 and SW1, and LED0 and LED1. 

 

Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now