Atmega644 Shift Register question

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I haven't used an AVR before, and I have the atmega644 with each IO port plugged into MAX7219's which are plugged into a column or row of an LED matrix (I am making a 16x16x3(RGB) LED Dance Floor). This matrix will be controlled with a computer with an interface that I will be able to program once I have all the LED's mapped out.

I guess my real question is:
Once I put the drivers on the atmega644 for USB, how do I specify that each IO pipe on it is like a serial IO (in my case it's more of a shift register)?

Also, when I bit-bang it over USB, how will it map the data so that it knows that a certain value is routed to a certain IO port?

A code example would also help A TON, then i could just figure it out myself.

Last Edited: Tue. Apr 22, 2008 - 08:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I haven't used an AVR before,
Have you used ANY microntrollers before? Not much difference from 1 controller to another once you know the basics.
Quote:
Once I put the drivers on the atmega644 for USB, .....Also, when I bit-bang it over USB
What drivers for USB are you talking about? I'm sorry but again I have to say to someone "you are biting more than you can chew", sorry.

How about starting with the usual flashing led and then progress to the good old "Hello world" program? Have you done these excersises? Then you would know how to initiliase a port for output.

Do you know about SPI? It is pretty much a shift register of sort. Does the chip you want to use communicate via SPI perhaps?

Have you read up the data sheet for the M644 and what it can do for you?

Do you have a diagram for your board?

These will be the questions you will be asked by anyone willing to help you.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the bored all hooked up and stuff, and I haven't really messed with uC's that much. I would learn all this myself slowly, but the party im making this for is this Friday, that is the only reason im asking to be kinda spoon fed here. Sorry 'bout that :\

Also, I just got the atmega644 from mouser, put a crystal on it with a couple of caps, and a max232 wired to a serial port...all correctly.... I actually know how to do THAT part... therefore it DOES support SPI which I can program it over serial...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
but the party im making this for is this Friday
Well if it was Friday ...6 month from now...and you worked REALLY hard you MIGHT have a working board. "Sorry 'bout that :\" :(

So do you have a circuit diagram showing people what you want to do? Or are we suppose to guess?

Since you have the RS232 all wired up, have you tried that bit out to see if you can talk to Hyperterminal? (ie get the good old "Hello world" program running as suggested above)

And of course we don't know your preferred programming language, do we?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I prefer C/C++, or the arduino, I am on IRC and these guys suggested the arduino bootloader and other software to run the uC.... I am interested in that route since I do not know much about uC's but need to use the atmega644. The matrix is done and i have all the supplies and board and everything, i just need to hook this thing up and program it. I would like a bootloader that is similar so that I can get this done fast.... then I will learn all this stuff after i am done with my primary goal...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So do I have this right:
- A PC runs software that decides which LED panels to light up at any given time.
- The PC sends commands (via USB) to the ATmega644 telling it everything it needs to know about which segments to light up.
- The ATmega644 interprets the commands from the PC and sends commands out to the LED row and column matrix to light up the appropriate panels.

Do you already have a bitbanging USB library for the ATmega644 ready to go? If not, then I'm fairly certain you won't be able to start from scratch and get it all working before Friday. If possible, I'd suggest going for a much simpler physical layer such as RS232, for which you apparently already have hardware.

I think we can divide your inquiry into 4 broad strokes:
1) Design the software in the AVR that directly controls the LED matrix. This will require some more knowledge of the actual hardware - you say the LED matrix is already built... May we have a look at the schematic? How will it be physically interfaced with the ATmega644?

2) Specify the protocol used to communicate LED control instructions from the PC software to the AVR. What form of data is most convenient to send across? A selection from a series of pre-programmed patterns? A direct bitmap of each individual segment in the LED panel? Raw row and column driver data?

Do you want to stream the data out in real time? Or do you want to send out a burst of several seconds' worth of data in advance, along with timing information to tell the driver how long to hold one pattern before moving on to the next?

3) Design the software in the AVR that receives and interprets these control sequences, and uses this data to control the software designed in step (1).

4) Design the software in the PC that generates LED control sequences based on this protocol.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ditch the USB for control and use the much, much simpler UART/RS232. You'll never finish a USB driver in time for the party! If your computer doesn't have a serial port, buy a cheap USB-to-serial adaptor. Besides, would you rather be working on a USB driver or learning the latest disco grooves? :lol:

Math is cool.
jevinskie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I would like a bootloader that is similar so that I can get this done fast....
How will the bootloader help to "get this done fast"??? How will you program the bootloader into the chip to start off with??
Quote:
May we have a look at the schematic?
Don't ask silly questions...that's my job :lol: I have already asked twice for that.

Was I out of line when I asked

Quote:
How about starting with the usual flashing led and then progress to the good old "Hello world" program?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I said before, I do not have 6 months to learn to program this uC in C...

the reason why i suggested getting the arduino is because the language is simple and easy to interface to get what we are doing done

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

obnauticus wrote:
As I said before, I do not have 6 months to learn to program this uC in C...
Then hire a professional to do the work for you.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I'm sure your friends will understand if you can't get it working by this Friday's dance. Maybe the next party it will be working.

It's not as if it were a school or college assignment with a completion dealine and the teacher would not understand you.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ArnoldB wrote:
obnauticus wrote:
As I said before, I do not have 6 months to learn to program this uC in C...
Then hire a professional to do the work for you.

Umm, no. I have it already figured out and programmed, please tell your moderators to keep their people in line better so their forum isn't a waste of bandwidth and time, it could save them money in the future. Had i listened to you guys telling me to say hello world it would have taken me months, f***ing idiots.

and thanks jp for your help I'm serious about that too.

MOD: PROFANITY EDITED OUT

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great, no need to waste any more time with your current project or any future projects.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, I want to make an spaceship to hyperdrive to some near star system. Range and staff is unknow. I should do it for tomorrow morning (countdown in on progress). I have an Attiny11 and no idea about electronics and rocket stuff. Can someone help me to do this?.

My boss would blame me if this fails, because salesman would loos a big contract (€ billions) they adquired one century ago. But everything is my fault, since I only asked what I have to do this morning (I was hired for this project last monday).

I need to do this in JAVA, realtime, and cryogenics. Video streaming also from the onboard cameras. GPS of course. Can you give me the code?

I can't use something bigger and more expensive than one ATtiny11, since it is too expensive. I will be using assembler and AVRStudio 4.14 since it is free.

I can't post the schematics, since it is secret, as is the BOM (written by salesman in order to have it cheap).

Conclusion: ignorance is bold.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

obnauticus,

I'm working on almost the same project:
Binary Random Numbers to Control LEDs

I plan on working on this all summer...

Best of luck to you, check back in to compare progress and notes.

Good luck!

--Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

obnauticus wrote:
please tell your moderators to keep their people in line better ... f***ing idiots.

Enough said.

CJL: LUKE HOPE YOU UNDERSTAND BUT I EDITED THAT AS THERE'S NO PLACE FOR THAT KIND OF LANGUAGE HERE. THE REAL QUESTION IS WHETHER HIS ID SHOULD BE obnauticus OR obnoxious ;)

@obnauticus,

If you show further insulting behaviour I'll simply lock this thread and any subsequent threads you try to start in a similar fashion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'll simply lock this thread and any subsequent threads you try to start
No need to, I doubt anyone will bother trying helping him out in the future. No that he needs help anyway, if he can get his project up and running in a few days without knowing what he is doing he will not need anyone's help anymore.

I do understand his stress toward us for not GUESSING what he wanted to do and hand him the design including the software. I'm sure he will be less stressed by Saturday morning when his party will be a hit with his flashing colour lights fully working.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am wondering how big this dance floor is. That's a lot of LED's. How is the boy blunder managing power?

Oh well, I gess we will never know.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a link to a LED dance floor, AVR powered, at Microsoft (IIRC). They control everything from a PC, that sends patterns to an array of AVR's, that controls an array of RGB LED's each.

That was a fairly large (in many senses) project, handled by a group of people at some University, that knew enough and that devoted enough time to it. Definitively, if OP can handle this project in such a short time, then he never would need our advice.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I found the link:

http://blogs.msdn.com/coding4fun...

Really nice, but it was a 10 months development.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's a nice project! I did an LED based games system using a 16x16 matrix that had 3 LEDs per square, and I can relate to how much work and wiring it takes to get this working. i did not even have PWM, just 8 colors, and the wiring was still a massive effort.

Brad

Guillem Planisi wrote:
Well, I found the link:

http://blogs.msdn.com/coding4fun...

Really nice, but it was a 10 months development.

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WEll, here it is...FRIDAY!!

Did the boy blunder get his dance floor operational? Or did he realize how outrageous his rant truly is?

God must love troll's....makes so damn many of them.

jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user