Forum Index > Projects > LED Pegboard and Matrix Projects
 Can't program Meggy on Mac
 |  Printable Version
By: Anonymous: magician13134 () on Sunday, December 28 2008 @ 04:11 PM PST (Read 42124 times)  
Anonymous: magician13134

Hi, I've got an Intel Mac, my Arduino works fine with it (Arduino-0012), but my Meggy Jr. RGB won't program... I downloaded the libraries, examples compile fine, but I get

PHP Formatted Code
avrdude: stk500_rcv(): programmer is not responding
avrdude: stk500_rcv(): programmer is not responding


My board is set to Decimelia, my port is dev/tty.usbserial-FTE4xW19
Any help, please?

Thanks very much!





       
   
By: Windell (offline) on Sunday, December 28 2008 @ 07:40 PM PST  
Windell

There are a couple of immediate and obvious things that will cause this problem. First, make sure that your Meggy Jr RGB is on and powered before you attempt to program it; there should be at least *some* LEDs on. Second, make sure that your USB-TTL cable is plugged in correctly to J2: The green wire should be on the side that says "GRN" and the black wire should be on the side that says "BLK." All six pins need to be lined up neatly.

If you are 100% sure of both of these, then there may be an actual hardware problem-- and you should start with the knowledge that 90% of assembly issues are caused by bad or missing solder joints! Carefully check the solder joints in the following locations:

J2 (the 6-pin connector for the USB-TTL cable), all 6 pins.
U1 (the microcontroller), pins 2 and 3. These are the two pins next to the one with the square pad.

-Windell


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: magician13134 () on Sunday, December 28 2008 @ 09:11 PM PST  
Anonymous: magician13134

I am 100% sure that the device is on, is it ok that the game is playing? Also, the cable is plugged in correctly... I've looked at the solder joints, everything LOOKS good... I can try reheating them later. Oh, and one more thing, my kit didn't come with a 100 ohm resistor, so I used a 220, which was the closest I had... Is that a problem?





       
   
By: Windell (offline) on Sunday, December 28 2008 @ 11:03 PM PST  
Windell

> is it ok that the game is playing?

Yes, that's perfect.

> I've looked at the solder joints, everything LOOKS good... I can try reheating them later.

For better or worse, there's really not that much to go wrong here. The path from the USB cable to the chip is short, and that's all that needs to be in place for the programming to work. Check for anything that looks out of the ordinary on the top or bottom of the board, look especially for extra solder bridges and potential intermittent solder joints.

>Oh, and one more thing, my kit didn't come with a 100 ohm resistor

Doh! Oops!
Yes, the 220 ohm will work fine; it will be a bit less loud. We can send you a 100 ohm if you want.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: magician13134 () on Sunday, December 28 2008 @ 11:27 PM PST  
Anonymous: magician13134

No, that's fine about the resistor, I'm just totally baffled that I can't program this, and I was looking for ANYTHING that could have caused it... All of my soldering looked good, no bridges, nothing loose.... I dunno, I'll keep looking and post pictures of the top and bottom tomorrow.





       
   
By: Anonymous: magician13134 () on Sunday, December 28 2008 @ 11:33 PM PST  
Anonymous: magician13134

This is a long shot, but I wonder if it's my USB cable? I ordered it specially for this kit, as I have nothing else that needs it yet... What's the easiest way to test that? (I've got most necessary tools, multimeter, Arduino, simple scope...)





       
   
By: Anonymous: magician13134 () on Sunday, December 28 2008 @ 11:46 PM PST  
Anonymous: magician13134

Gah! I just resoldered every pin and I'm still getting the same thing! (I should really create an account, so I can edit my posts, sorry!)
I'll try from a Windows computer tomorrow, but other than that... I'm out of ideas!





       
   
By: Windell (offline) on Monday, December 29 2008 @ 12:30 AM PST  
Windell

>This is a long shot, but I wonder if it's my USB cable?

Could be, but I expect that it was factory tested; it wouldn't be my first guess.

Since you've got a scope, you should be able to see signals from the computer traveling towards the Meggy when it tries to program. Look at pin 4 of the 6-pin connector-- that's the one right above the USB5V hole. You could also use the multimeter to test continuity between the pins of the 6-pin connector and the corresponding pins of the chip.

Connector pin 1,2 -> Chip pin 8 (ground)
Connector pin 4 -> Chip pin 2 (RX)
Connector pin 5 -> Chip pin 3 (TX)
(Pin 1 of the connector and chip each have a square pad.)

Since you seem to know what you're doing, you might also want to grab the Meggy Jr schematic <A HREF="http://www.evilmadscientist.com/source/MeggyJrASchematics.pdf">here</A> and see if anything else looks unusual.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: magician13134 (offline) on Monday, December 29 2008 @ 09:22 AM PST  
magician13134

Well, on Windows, I get a "not in sync" error, rather than the "programmer not responding". However, both my multimeter and scope show no activity on pin 4 (or any pins for that matter) before, during, or after programming on either OS. I can't think of anything else to do Confused
Oh, and continuity is good for all the pins...


Forum Apprentice
Apprentice

Status: offline

Registered: 12/29/08
Posts: 12

Profile Email    
   
By: Windell (offline) on Monday, December 29 2008 @ 10:20 AM PST  
Windell

Using a Mac certainly isn't a problem in itself-- Meggy Jr was designed and programmed on a Mac in the first place.

The "Not in sync" error usually has a different cause, indicating that the chip isn't properly being reset. This can also be caused by a separate bug on windows systems, fixed by setting: Device Manager - Comm Ports - USB Serial Port -Port Settings - Advanced button - Set RTS On Close. It can also be caused if C6 and R4 aren't properly soldered in place, along with J2 pin 6 and U1 pin 1.

So I would indeed start to suspect your USB-TTL cable. Which model do you have? (TTL-232R-???) I'll take a look tonight to see if I can come up with a good test on the scope to make sure that it's working.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: magician13134 (offline) on Monday, December 29 2008 @ 11:21 AM PST  
magician13134

I got my cable here:
http://www.adafruit.com/index.php?main_page=product_info&cPath=31&products_id=70&sessid=661c84bfe927f63cd7a45491bc6f458b

All of the pins were either 0V (1 and 2) or 3.366V (3-6) at all times... I DO have a real serial port and I've got a plug or two laying around, should I try to make a makeshift cable? The 6 pins are GND, GND, Voltage(?), TX, RX, Voltage(?), right? Are those pins on a DB-9 connector?


Forum Apprentice
Apprentice

Status: offline

Registered: 12/29/08
Posts: 12

Profile Email    
   
By: Windell (offline) on Monday, December 29 2008 @ 12:27 PM PST  
Windell

Hmm-- that's actually not the same cable that we use-- we use the 5 V version. (In principle, it should work fine but I don't have one handy to compare to yours.) Again, I'll see if I can find a good 'scope test of the cable itself.

As far as hooking up your serial port directly, be careful that you are sure what you are doing. The RS232 levels and polarity out of your computer are *not* suitable for hooking directly to the Meggy Jr; you will still need the level shifting function that would otherwise be provided by the USB-TTL cable. Here is a simple circuit that can perform this function, complete with schematic:
http://www.sparkfun.com/commerce/product_info.php?products_id=133



Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: magician13134 (offline) on Monday, December 29 2008 @ 01:11 PM PST  
magician13134

Yeah, a little research showed that that was not the best idea... I really want to start programming for this, I see that there's another 6 pin jumper... If I use my USBTiny with that, will it erase the bootloader from the ATMega?


Forum Apprentice
Apprentice

Status: offline

Registered: 12/29/08
Posts: 12

Profile Email    
   
By: Windell (offline) on Monday, December 29 2008 @ 01:33 PM PST  
Windell

> If I use my USBTiny with that, will it erase the bootloader from the ATMega?

You've got a USBtiny? Then you can definitely start today. Smile Programming with it will erase the bootloader, but you can also use it to "burn" the bootlader, right from the Arduino environment, if that's what you want to do.

You can even use the USBtiny from within the Arduino environment: http://www.arduino.cc/en/Hacking/Programmer


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: magician13134 (offline) on Monday, December 29 2008 @ 01:51 PM PST  
magician13134

Gah! Initialization failed... The game is on (although, the screen/LEDs don't work when the ISP is plugged in) and the ISP is oriented correctly... I'm just running into all kinds of problems... I'll keep digging, though


Forum Apprentice
Apprentice

Status: offline

Registered: 12/29/08
Posts: 12

Profile Email    
   



 All times are PDT. The time is now 02:50 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?