0

initialization failed
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

initialization failed

by failed on Wed Oct 31, 2007 5:37 pm

hi there

try to program tvbgone with the eu firmware.
don't know why, but i'm not able to do it!
downloaded the makefile and firmware from this post and changed the MCU to t85.

i get this error message:
Code: Select all | TOGGLE FULL SIZE
avrdude -p t85 -c usbtiny -U flash:w:tvbgone_eu.hex

avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

make: *** [program-tvbgone_eu] Error 1


i put the microcontroller on an breadboard and connected it with my isp. same error message

greetings, failed
failed
 
Posts: 10
Joined: Wed Oct 31, 2007 5:30 pm

by maltman23 on Thu Nov 01, 2007 2:52 pm

For this version of the kit, the driver circuitry for the IR emitters seems to conflict with the programming circuitry for the micro. So, on your breadboard, try programming it with the 47 ohm base resistors disconnected from the micro. That should work.

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

by adafruit on Thu Nov 01, 2007 4:33 pm

that code is probably not going to work as it was designed for a completely different chip. mitch and i will soon get working on writing EU firmware for the tvbgone kit.

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by failed on Thu Nov 01, 2007 5:02 pm

kewl, thanks for the good news.

but i'm really wondering why i can't talk to the controller when is use:
Code: Select all | TOGGLE FULL SIZE
avrdude -c usbtiny -p t85

i always get the same error message, even when i put the bare controller on a breadboard an hook-up like that:

Image

and use this pin configuration:

Image

and when i user the -F option a get this message:
Code: Select all | TOGGLE FULL SIZE
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATtiny85 is 1E 93 0B
avrdude: safemode: Verify error - unable to read hfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted

avrdude done.  Thank you.
failed
 
Posts: 10
Joined: Wed Oct 31, 2007 5:30 pm

by adafruit on Thu Nov 01, 2007 5:05 pm

i think you need the 8mhz crystal attached.

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by failed on Thu Nov 01, 2007 5:13 pm

ok, i'm going to try it tomorrow.
is this because the special type of microcontroller or why?

i have a atmega8 as well, i don't need a external beat. but i have a pull-up resistor attached to the reset pin.
failed
 
Posts: 10
Joined: Wed Oct 31, 2007 5:30 pm

by adafruit on Thu Nov 01, 2007 5:15 pm

yeah i dont know why but i think i remember that when i used a crystal it worked better
you also have to power the chip
and id suggest using the makefile that comes with the project
beyond that, this isn't really a tv-b-gone kit question anymore...you may want to go to avr-specific websites and forums for help!
Last edited by adafruit2 on Thu Nov 01, 2007 5:28 pm, edited 1 time in total.

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by maltman23 on Thu Nov 01, 2007 5:26 pm

You can also try first burning the fuses so that the ATtiny85 runs off of its internal oscillator. To do that try this command:
avrdude -p attiny85 -P usb -c usbtiny -B 250 -u -U lfuse:w:0xe2:m -U hfuse:w:0xde:m

Then you'll need to re-burn the fuses back to using a ceramic resonator by using this command:
make burn-fuse

Also, be sure you are telling avrdude where to find the hardware. In the above avrdude commands, they both assume it is on the USB port. They also assume the "usbtiny" programmer.

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

by failed on Fri Nov 02, 2007 2:57 pm

i hooked-up alltogehter with an external resonator and i'm able to flash the controller. no i'm going to pick some desired eu power codes and add it to yours.

note: some of the new panasonic/samsung flatscreens work with the na/asia power codes.
failed
 
Posts: 10
Joined: Wed Oct 31, 2007 5:30 pm

by maltman23 on Sun Nov 04, 2007 5:26 am

Actually, about 50% of the TVs in Europe will work with the North American database, and vice-versa. But that's only 50%, and they're not in the same order of popularity, which is why I created two databases.

Some of the European codes have longer timings than any North American codes, and so won't fit into the firmware as it stands (the times take more than 16 bits alloted for all timings). But if you wanna hack the firmware to make it work with the European codes, it's way do-able! That's what me and Ladyada will be doing when we release a European version (sometime soon, but no release date, yet).

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

by oPossum on Sun Nov 04, 2007 9:30 am

maltman23 wrote:Some of the European codes have longer timings than any North American codes, and so won't fit into the firmware as it stands (the times take more than 16 bits alloted for all timings).


That's interesting. I did a capure of a TV-B-Gone purchased a few years ago and all the EU codes (R5 installed) fit within a 16 bit unsigned int with 10 uS resolution.

Download EU codes

Pretty Picture

-
Last edited by oPossum on Sun Nov 04, 2007 6:00 pm, edited 1 time in total.
User avatar
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

by maltman23 on Sun Nov 04, 2007 5:43 pm

The original TV-B-Gone uses different firmware (for a Zilog Z8 chip), and the database is in a different format. The firmware for the TV-B-Gone Kit was optimized for the North American POWER codes' timing values, and the longer timing for some of the European codes won't fit in 16 bits with this particular firmware. However, there is nothing particularly magic about the way we're timing things with the current firmware for the Kit, so please feel free to hack it (since I don't have time to do it myself for awhile).

Feel free to ask questions, though, along the way, and I'll be glad to help.

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

by oPossum on Sun Nov 04, 2007 7:12 pm

maltman23 wrote:the longer timing for some of the European codes won't fit in 16 bits with this particular firmware.


I think this belief may be based on bad information. The EU version of the POV code has some inaccurate times.

Code: Select all | TOGGLE FULL SIZE
From POV:
//  { ( ( (8000000.0 / 37470.0) / 2.0 ) - 1.0),   0 },  // Code 105 -- Sharp
//  { 273296,   194 },
//  { 276976,    81 },
//  { 276816,    81 },
//  { 276976,    81 },
//  { 277296,    81 },
//  { 276816,    81 },
//  { 276816,   194 },
//  { 277136,   194 },
//  { 276816,    81 },
//  { 276816,   194 },
//  { 276976,    81 },
//  { 277136,    81 },
//  { 276816,    81 },
//  { 276816,   194 },
//  { 276976,    81 },
//  { 276976,  4928 },

From my capture:
const struct powercode code_eu004 PROGMEM = {
   freq_to_timerval(38885),
   {
      { 25, 187 },
      { 27, 77 },
      { 26, 78 },
      { 25, 80 },
      { 26, 77 },
      { 25, 78 },
      { 24, 189 },
      { 25, 189 },
      { 25, 78 },
      { 25, 189 },
      { 25, 78 },
      { 25, 80 },
      { 26, 77 },
      { 25, 189 },
      { 25, 77 },
      { 25, 4786 },


From POV:
//  { ( ( (8000000.0 / 37430.0) / 2.0 ) - 1.0),   0 },   // Code 106 -- Samsung
//  { 4681248,  480},
//  {  558128,  175},
//  {  558288,  175},
//  {  558288,  175},
//  {  558288,   64},
//  {  558288,   64},
//  {  558288,   64},
//  {  558128,   64},
//  {  558288,   64},
//  {  558288,  175},
//  {  558288,  175},
//  {  558288,  175},
//  {  558128,   64},
//  {  558128,   64},
//  {  558288,   64},
//  {  558288,   64},
//  {  558288,   64},
//  {  558448,   64},
//  {  558128,  175},
//  {  558448,   64},
//  {  558288,   64},
//  {  558128,   64},
//  {  558128,   64},
//  {  558288,   64},
//  {  558288,   64},
//  {  558288,  175},
//  {  558288,   64},
//  {  558128,  175},
//  {  558288,  175},
//  {  558128,  175},
//  {  558288,  175},
//  {  558448,  175},
//  {  558288,  175},
//  {  558288, 4592},


From my capture:
const struct powercode code_eu006 PROGMEM = {
   freq_to_timerval(38000),
   {
      { 454, 466 },
      { 53, 170 },
      { 53, 171 },
      { 51, 171 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 52, 62 },
      { 53, 62 },
      { 53, 170 },
      { 53, 170 },
      { 53, 171 },
      { 52, 63 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 53, 170 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 53, 62 },
      { 53, 63 },
      { 52, 63 },
      { 53, 170 },
      { 53, 62 },
      { 53, 170 },
      { 53, 170 },
      { 53, 170 },
      { 53, 170 },
      { 53, 170 },
      { 53, 170 },
      { 53, 4460 },


If the POV times where correct, it would take a looooooooog time to send those codes! The first two digits of the on time are OK, but the following four are garbage.
Last edited by oPossum on Sun Nov 04, 2007 8:21 pm, edited 1 time in total.
User avatar
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

by maltman23 on Sun Nov 04, 2007 7:34 pm

That could very well be! I found some decimal place errors in my NA codes, too. So, there may be errors in my EU codes. I'll be double (and triple) checking all of my codes when I have time.

How are you getting your codes? If you find more errors, please let me know. Thanks!

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

by oPossum on Tue Nov 06, 2007 3:44 am

I am using a system of my own design to capture codes from IR and RF remotes. The TV-B-Gone (commercial version) is a great test case for this system.

I noticed one mistake in the NACodes.c file, and tweaked a few things.

Code 042 (Sony) has a frequency of 74940 - it should be 40000. All Sony 7, 12 and 20 bit codes are always 40 kHz (Sony HIR is 455 kHz). The other two sony codes where close, but not exact. The timing of Sony codes uses times of 600, 1200 and 2400 uS. All the Sony codes where fixed with these exact numbers.

There where a few RC-5 codes that had frequency and timing that was a bit off. RC-5 and RC-6 are 36000 Hz.

May have fixed something else too - don't remember.

Code 051 looks like garbage.


Updated NACodes.c file
User avatar
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Please be positive and constructive with your questions and comments.