tvbegone firmware

Get help and show off your TV-B-Gone kit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
opossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am

Re: tvbegone firmware

Post by opossum »

I edited main.h to enable debugging. (#define DEBUG 1)

Compiled and programmed chip...

Code: Select all

make clean
make NA_CODE=1
make program
I don't have the rev 1.2 TV-B-Gone, so I used a breadboard with the tiny85, 8 MHz resonator and a bypass cap. Supply voltage was 5 volts.
The debugging info was displayed properly at 19200,8,N,1

You could try disabling the IR LEDs by lifting one end of R2. That will keep the battery voltage from dipping. If that doesn't work, try a 5 volt supply (with IR LEDs still disabled).
Attachments

[The extension hex has been deactivated and can no longer be displayed.]

td.PNG
td.PNG (8.84 KiB) Viewed 2431 times

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

oPossum wrote:I edited main.h to enable debugging. (#define DEBUG 1)

Compiled and programmed chip...

Code: Select all

make clean
make NA_CODE=1
make program
I don't have the rev 1.2 TV-B-Gone, so I used a breadboard with the tiny85, 8 MHz resonator and a bypass cap. Supply voltage was 5 volts.
The debugging info was displayed properly at 19200,8,N,1

You could try disabling the IR LEDs by lifting one end of R2. That will keep the battery voltage from dipping. If that doesn't work, try a 5 volt supply (with IR LEDs still disabled).
Thank you for your suggestions. Using my test tvbgone 1.2, I disabled the IR LEDs by cutting R1 (No R2 on my kit) (verified IR LEDs disabled using webcam), and I removed the batteries and wired it up to be powered by the 5v line on my FTDI Friend:
photo.JPG
photo.JPG (313.21 KiB) Viewed 2428 times
I compiled against a clean extract of the 1.2 firmware, using your make steps after enabling debug in main.h

Connecting with a terminal app I am still getting garbled output:
SecureCRT-19200.png
SecureCRT-19200.png (39.48 KiB) Viewed 2428 times

User avatar
opossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am

Re: tvbegone firmware

Post by opossum »

What version of avr-gcc are you using?

Try the firmware hex I attached to the previous post.

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

oPossum wrote:What version of avr-gcc are you using?
I am using avr-gcc 4.0.2 on OS X 10.6.5, installed via the macports collection. My avr-libc is version 1.7.0

Comparing that against the ports available for FreeBSD, it looks like my laptop version of avr-gcc is a several significant releases behind current.
oPossum wrote:Try the firmware hex I attached to the previous post.
Well bugger me, your firmware hex worked. I am getting nice clean debug output.

Am I running a completely outdated version of avr-gcc?

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

ChrisKnight wrote:
oPossum wrote: Am I running a completely outdated version of avr-gcc?
Well, it was absolutely something in my development environment. I was able to compile a clean debug enabled version on my FreeBSD box, copy over the .hex, burn it to an attiny85, and I am getting debug output.

Thank you very much for your help, especially taking the time to build out a test unit.

-Chris

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

ChrisKnight wrote:
I am using avr-gcc 4.0.2 on OS X 10.6.5, installed via the macports collection. My avr-libc is version 1.7.0

Comparing that against the ports available for FreeBSD, it looks like my laptop version of avr-gcc is a several significant releases behind current.

Am I running a completely outdated version of avr-gcc?
Updated to gcc 4.5.1, built avr-gcc 4.5.1 (lots of fun, due to a bug in 4.5.0+), installed ave-libc, avrdude, etc. The debug enabled version of tvbgone 1.2 compiles fine, installs, and still doesn't give me usable output*. I am giving up on using my Mac for this. I've spun up a FreeBSD build-box on my VM server, and I'll just use the Mac for writing the compiled binaries. I can't believe how much time I have spent chasing my tail on this.

Thank you for all your help. Having moved to my build box, my code for turning a tv-b-gone into a Nikon ML-L3 remote for my camera is working perfectly. I can now remote control my camera from 150' away. I'll be posting the code shortly.

*The reason this is important is that the same timing issue that makes the debug output unusable also affects the IR output timings.

-Chris

User avatar
opossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am

Re: tvbegone firmware

Post by opossum »

I am using avr-gcc 4.3.3 on Windows Vista.

I installed the latest CrossPack for AVR on my MacBook Air running Snow Leopard. Using the same build instructions results in the exact same hex file.

So I think you can use your Mac for development if you use arv-gcc 4.3.3 (CrossPack 20100115).

Thanks for sticking with this. It is frustrating when someone asks for help and then disappears.

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

oPossum wrote:I am using avr-gcc 4.3.3 on Windows Vista.

I installed the latest CrossPack for AVR on my MacBook Air running Snow Leopard. Using the same build instructions results in the exact same hex file.

So I think you can use your Mac for development if you use arv-gcc 4.3.3 (CrossPack 20100115).
I just tried CrossPack for AVR, per your suggestion, and I am still getting garbled debug output and the checksum isn't matching the working .hex that I have. I think this may be an artifact of all the other funky stuff I tried, and probably failed to get completely cleaned off my system. Next time I do a clean OS install on my laptop, I'll give CrossPack a try.

I wound up taking a spare laptop and setting it up as a desktop
oPossum wrote:Thanks for sticking with this. It is frustrating when someone asks for help and then disappears.
I wouldn't ask if I didn't want to learn. :)

Thank you for sticking through my newbie grade questions and issues. Now that I have my build environment working, I am hoping to be posting a higher grade of questions.

I'll still be posting the code for turning a tv-b-gone into a Nikon/Canon shutter remote, but I need to wait until I get the Canon shutter code tested.

User avatar
chrisknight
 
Posts: 24
Joined: Mon Nov 30, 2009 10:40 pm

Re: tvbegone firmware

Post by chrisknight »

oPossum wrote:I am using avr-gcc 4.3.3 on Windows Vista.

I installed the latest CrossPack for AVR on my MacBook Air running Snow Leopard. Using the same build instructions results in the exact same hex file.
Got my laptop cleaned up, and now tvbgonew/debug compiles and runs correctly. Thank you for the pointer to CrossPack. I had looked at it some point, but decided to compile the tools myself since CrossPack hadn't been updated in a while. Just goes to show that newer isn't better.

Drats... Now I have no excuse for two laptops on my desk. :)

Locked
Please be positive and constructive with your questions and comments.

Return to “TV-B-Gone Kit”