digital boggle

Thread Starter

roneesh

Joined Jan 10, 2009
5
Hello all,

This is my first post on here.

I'm a mechanical engineer with a bent for EE stuff... I've recently gotten into DIY home electronics, I've made two headphone amps so far, but that's it.

I would like to make a digital boggle game using 16 14-segment blocks. My programming experience has already let me pretty much write it in C++, however I have no clue where to begin with when it comes to controlling 16 14-segment displays.

From what Ive found, I'd need to set them up via a micrcontroller. I've looked for maybe 3 hours and found no clear direction beyond that.

Can someone please tell me a few things?

1. Is this feasible? Can 16 14-segment displays be controlled at the same time? So far I've seen some micros that said they can control 8 displays, but have not seen 16 so far. Is there just some better way to do this (besides buying a digital boggle someone else made ;))

2. Is there anything that might be easier than 14-segment displays? Maybe digital keyapds or a big LED screen?

3. If feasible and 14-seg displays are not way harder than something else, can you recommend a brand of micrcontroller? It would ideally have the following characteristics: Be able to be programmed in upper level language (C would be great). Have some sort of program on my computer that can be used to load the program onto the micro, write the code, etc. Interface with my computer via USB (serial ok but prefer USB). Have the microcontroller be open source or have large dev community so I could reference code examples.

Let me be honest, I did not study microcontrollers in school, I don't have a clue about them, and my online research has yielded very little.

So... any help, websites, books, FAQ's, or answering my specific questions will be greatly greatly greatly appreciated.

thanks,
roneesh

P.S. why digital boggle? I'm literature nut on the side too, and I find this a fun way to combine both my hobbies.
 

futz

Joined Dec 14, 2008
23
1. Is this feasible? Can 16 14-segment displays be controlled at the same time?
Yes and yes. It's not going to be simple though.

So far I've seen some micros that said they can control 8 displays, but have not seen 16 so far. Is there just some better way to do this (besides buying a digital boggle someone else made ;))
Think shift registers. You could use anything from a stack of el-cheapo 74HC595 8-bit chips to a bunch of HEF4894B 12-bit chips to things like Maxim's MAX6956 or other LED driver chips they sell. The Maxim chips are big shift registers with LED brightness control and other niceties. Of course they're the most expensive option. Allegro makes some nice LED driver chips too, as does Micrel and others. The 595 and 4894B are plain old shift registers and as such, are inexpensive.

All can be cascaded for using multiple chips for big displays. They're very fast, so multiplexing code won't be a problem.

2. Is there anything that might be easier than 14-segment displays? Maybe digital keypads or a big LED screen?
Graphic LCD? You can get a 128x64 mono one for $10.00. Bigger ones, and color are much more expensive.

3. If feasible and 14-seg displays are not way harder than something else, can you recommend a brand of microcontroller?
Microchip PIC. Huge product line. Tons of nice help and tutorials online. Cheap and excellent programmer/debugger tools and free software galore.

Atmel AVR. Small product line. Lots of nice help and tutorials online, but maybe not so much as PIC. Tools and software same as above.

Good places to start. There are tons more, like TI's MSP430 line (good chips - not such a big hobbiest following), ARMs (complex and somewhat difficult to get started with - but wow! fast and nice!). And many many more.

It would ideally have the following characteristics: Be able to be programmed in upper level language (C would be great).
Virtually all MCUs have C compilers available. Prices range from free (AVR GCC), to $75ish for the excellent BoostC for PICs, to hundreds of dollars, to the sky's the limit for others (many thousands of dollars).

There are also BASIC compilers and other languages too.

Have some sort of program on my computer that can be used to load the program onto the micro, write the code, etc. Interface with my computer via USB (serial ok but prefer USB).
You will need programmer/debugger hardware to load your code into the MCU's flash memory. Forget serial - new computers don't have serial anymore and USB/serial adapters are notoriously unuseable for programming. For PICs, look at the Microchip PICkit 2 or a good clone like Blueroom Electronics Junebug. The Junebug is a PICkit 2 compatible combined with an 18F1320 experimenter. Good stuff.

For AVRs, look at the AVR Dragon. Good programmer/debugger.

I won't even start on the plethora of hardware available for other chips. I could write a book!

For software, PICs and AVRs have excellent free IDEs with debugging and many other helpful tools built in. MPLAB for PIC and AVR Studio for AVR. There's a free IDE for almost any MCU you can name, as well as many for $$ IDEs.

Have the microcontroller be open source or have large dev community so I could reference code examples.
There's no open source hardware, but many MCUs use the GCC toolchain, either for free (Eclipse/GCC) or for pay (most of Microchip's compilers are GCC based, but you pay for support/libs/etc.

Let me be honest, I did not study microcontrollers in school, I don't have a clue about them, and my online research has yielded very little.

P.S. why digital boggle? I'm literature nut on the side too, and I find this a fun way to combine both my hobbies.
Well you've got a long way to go. You'll have to spend a lot of time learning the basics, so put that Boggle game on the back burner for a while while you practice blinking LEDs and other simple stuff to get up to speed on programming and interfacing MCUs. If you just dive right in the deep end you'll be overwhelmed and will be forced to back up and do the simple stuff first anyway. These are very complex little beasties.

On the other hand, a lot of the beginner stuff you do can be directly related to your final project. You can breadboard up sub-assemblies of the project and learn with them.

Wow! What a post! :p I get to ranting and can't stop myself. :D
 

Thread Starter

roneesh

Joined Jan 10, 2009
5
Futz,

Thanks for the reply, its awesome to have a bit of knowledge now. I read "shift register" and realized I have a lot to learn. I have a decent background in DC, AC and power electronics from school, but digital was a topic never broached, wisely I believe, as it would have been an ME mutiny... If you could be so kind to clarify, I think I'm going to have to do the following, is this the correct path?

1. Learn to control shift registers (What exactly would a single 8-bit one control? A single 14-seg? does 8-bit mean it controls 8? 12-bit mean it can control 12?)

2. Learn to cascade shift registers to group them together? Does this allow them to know what the other ones are doing? Essential for Boggle.

I now agree that boggle is a far ways off... for the better I believe, as it seems I have a lot to learn.

Is a product like Pickit 2 a good way to learn microcontroller programming? If you can recommend this product or something like it, can you give me an idea of what I would projects it would let me do and what I would overall learn with it? Link to PICkit is below.

(http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805)

Thanks Futz

-Roneesh
 

futz

Joined Dec 14, 2008
23
If you could be so kind to clarify, I think I'm going to have to do the following, is this the correct path?

1. Learn to control shift registers (What exactly would a single 8-bit one control? A single 14-seg? does 8-bit mean it controls 8? 12-bit mean it can control 12?)
First learn to control your MCU and interface things. Learn how all the peripherals work. Sure, you can learn to use a shift register or two while learning that.

An 8-bit shift register gives you 8 output pins that you can control with only 2 or 3 MCU pins. If you cascade more than one 8-bit shift register then you can control large numbers of shift register output pins with those same 2 or 3 MCU pins. Get a datasheet for a 74HC595 and study it. It may or may not make total sense to you at present, but that's the kind of stuff you'll be learning.

2. Learn to cascade shift registers to group them together? Does this allow them to know what the other ones are doing?
Say you have two 74HC595's cascaded - you shift in 8-bits. That fills the first 595. You shift in another bit and they start shifting (or cascading) into the second 595. And so on till all 16-bits are full. Then you strobe (turn quickly on and off) the latch pin and all 16-bits appear on the 595s' output pins.

With more cascaded, you just shift in more bits before latching.

Is a product like Pickit 2 a good way to learn microcontroller programming? If you can recommend this product or something like it, can you give me an idea of what I would projects it would let me do and what I would overall learn with it?
If you're going with PICs you can't do without it. You need a piece of hardware to put your programs in the PIC (and do in-circuit debugging). The PICkit 2 is "it" for PICs at present. The PICkit 2 clones are PICkit 2 compatible, so essentially they "are" PICkit 2's. MPLAB can't tell the difference. ICD2s and ICD2 clones are a bit obsolete, but not bad.

Be very leary of other PIC programmers. Some designs still on the market are absolute antique junk. You DO NOT want to waste your time or money on some of that stuff. Stay clear of Velleman & DIY Kits in particular. Don't waste your time building any JDM variant. Mostly they just don't work with modern computers.

What projects can you do with it? Anything you can imagine, I guess. :p

-------------------------

As for the post preceding this one that gets into the PIC vs AVR vs other MCU argument, if you're programming in C it really doesn't matter what MCU you choose as long as it meets your hardware requirements. In C they all look much alike.

I have nothing against AVRs either. Atmel makes fine MCUs. I own a STK-500 and a Dragon, as well as an Ecros Dragon Rider 500 (and even a Butterfly). That said, I still think you get somewhat better online support with PICs. They're so popular that info (especially newbie info) is everywhere.

I routinely port C code from PIC to AVR to ARM and back. C is quite portable that way. Of course you have to make some changes to suit each chip, but they aren't huge usually.
 
Last edited:

Thread Starter

roneesh

Joined Jan 10, 2009
5
First learn to control your MCU and interface things. Learn how all the peripherals work.
What exactly do you mean by "interface things?" are you talking about just managing to write code and put it on the MCU? Also, what does peripherals mean? Pushbutton switches and LED's? I noticed the PICkit 2 starter kit said it had those features, so I assume they're there to so a new person can learn to control them?
 

futz

Joined Dec 14, 2008
23
What exactly do you mean by "interface things?" are you talking about just managing to write code and put it on the MCU?
I mean you'll need to learn the electronics methods to properly connect various components and devices to the MCU's pins. Do it wrong and you could damage or kill your MCU.

Also, what does peripherals mean? Pushbutton switches and LED's
Peripherals are the parts of the MCU that make it a microcontroller, and not just a microprocessor. Things like timers, UARTs, A/D, MSSP, Comparators, PWM, etc.

Switches and LEDs are just circuitry you add yourself.
 

Thread Starter

roneesh

Joined Jan 10, 2009
5
I see... dang, it looks like I have my work cut out for me!

So would you recommend the PICkit 2 link I posted to get started learning?

Also, are there are any books you can think of that might get me started?
 

futz

Joined Dec 14, 2008
23
I see... dang, it looks like I have my work cut out for me!j
Yes you do. :D

So would you recommend the PICkit 2 link I posted to get started learning?
No. I don't think you'll find much there of interest until you actually have a programmer and MCU.

On the other hand, some people seem to be able to do everything with a simulator. I can't. I need the chip in front of me before I get interested. If you're set on PICs, you can download MPLAB, pick a PIC model and write code and run it in the simulator with stimulus files to provide input.

MPLAB only comes with an assembler, so if you want a C compiler you need to pick one. I'm partial to BoostC, but there are others. Any decent one integrates itself into the MPLAB IDE, so you can run all your languages with one familiar IDE.

Also, are there are any books you can think of that might get me started?
There are lots. Some are good. Lots of them are obsolete crap too (surprisingly even some of the newer ones!). I've never really paid much attention to them, so can't recommend any.
 
Last edited:

futz

Joined Dec 14, 2008
23
Hey Roneesh, look thru my site to see what all this stuff looks like in use. Lots of it is fairly simple beginner stuff. Link at bottom of post.

Also, tour through this thread for more info.
 
Last edited:
Top