Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 57
61  Using Arduino / Microcontrollers / Re: ATMega1284P Issues on: April 13, 2013, 06:38:35 am
The resonator being at 16.9Mhz is probably not a big deal. It may screw up your timing a bit, but it shouldn't be causing your issues.

The res=00 part says that avrdude is not even seeing your bootloader. Generally, that is:

Lack of power, lack of clock, no bootloader, wrong protocol, or the bootloader is not ready for an upload.

We obviously have power since you say you can see the lights blinking.
As for the clock - for stability, I would go back to using the resonator. The Uno is also using a resonator, anyway.
Your blinking lights indicate that you have a bootloader
And if you don't already have a sketch on there, it should be always running in the bootloader, so it should be ready for an upload. Though, you will need to keep in mind the 'reset' part needed to get into the bootloader for later.

So that leaves the most likely culprit as the protocol...


The proper protocol IS stk500. It is the original arduino bootloader that cannot address the extra memory. This is the boards.txt for an atmega184P from the optiboot page:

Code:
############################################################## 
atmega1284o.name=[Optiboot] ATmega1284p
atmega1284o.upload.protocol=stk500
atmega1284o.upload.maximum_size=130048
atmega1284o.upload.speed=115200
atmega1284o.bootloader.low_fuses=0xC7
atmega1284o.bootloader.high_fuses=0xde
atmega1284o.bootloader.extended_fuses=0x05
atmega1284o.bootloader.path=optiboot
atmega1284o.bootloader.file=optiboot_atmega1284p.hex
atmega1284o.bootloader.unlock_bits=0x3F
atmega1284o.bootloader.lock_bits=0x0F
atmega1284o.build.mcu=atmega1284p
atmega1284o.build.f_cpu=16000000L
atmega1284o.build.core=arduino:arduino
atmega1284o.build.variant=arduino:standard

I did change this one line:
Code:
atmega1284o.bootloader.low_fuses=0xC7

It originally read 0xF7 but that is more suited for a crystal. C7 is intended for a ceramic resonator. That probably isn't your problem here (since you are getting blinking lights), but for stability-sake that's the fuses I would personally go with. Note that just changing it in your boards.txt file isn't going to change anything unless you reburned the bootloader using ISP.

If the crystal vs. resonator is somehow your issue, it would most likely be an issue with the upload speed. In both the boards.txt that you posted and this one, we are trying to upload at the fastest possible rate of 115200. You might have to dial that down. Try changing it to 57600 and finally 19200 if that doesn't work.

But, first, try changing your upload.protocol to stk500
62  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 09:39:50 pm
Quote
if the OP picked the lilypad
Lilypad hardware added an external resonator sometime between HW version 1.6 and 1.8
I haven't looked at what Nick's program does, but ... I wouldn't trust the "lilypad" board types in the IDE to have the correct fuses for the internal 8MHz clock.


Good point. The bootloader and fuse settings in Nick's program (the most recent as of today) is setting the lilypad configuration for the 8MHz internal clock.

I was hoping the OP would have gotten back with the answer to this as I am going to be less and less available this weekend to help them.
63  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 07:32:36 pm
Understood. But it won't work. You are missing that he/she is using the INTERNAL RC oscillator(no crystal, no resonator, nothing), but when he runs Nick's sketch  as an Uno, it programs the fuses for an EXTERNAL oscillator.

That's how chips get bricked.

So everything works fine right up to the point they actually try to use the chip.

You are correct, though, there is no difference between an 8Mhz and 16Mhz clock as far as the fuses or really even the bootloader are concerned. But there is a huge difference between internal and external clocks.

Of course, if the OP picked the lilypad (though I am certain the OP said they programmed Uno) then it should have worked.
64  Using Arduino / Microcontrollers / Re: ATMega1284P Issues on: April 12, 2013, 06:00:55 pm
Probably not. That should be fine. Are your fuses set to use it?

Also, another one of those "Is it plugged in" questions:

Did you program a bootloader in the chips already?
65  Using Arduino / Microcontrollers / Re: ATMega1284P Issues on: April 12, 2013, 03:40:04 pm
This might be a silly question, but I don't see anything in your posts addressing it, but what are you using for a clock on the 1284P?
66  Community / Bar Sport / Re: Truer words... on: April 12, 2013, 03:15:08 pm
To be fair, The Woz was never actually a classically trained engineer (he dropped out of college) and both Kilby and Hewlett/Packard had their breakthroughs while they were still VERY green, so really not the best examples.
67  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 02:30:21 pm
ok, digging further into Nick's code....

He is actually implementing the clock out feature on pin 9 (I missed his timer setup before.)

So, we actually have all the pieces that we need. It also looks like you have pin 9 going to your breadboard and it looks like it is going to the X1 pin, correct?

If so, run Nick's sketch again, but this time select Lilypad if you did not before. That should program the fuses correctly for your board and also upload the proper bootloader.
68  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 02:06:40 pm
I am looking through Nick's sketch right now and noticed that he began to implement the clock out feature, but it is not complete. And I also noticed that with the Lilypad selected, it sets the fuses for the internal 8MHz clock.

Which one did you select? L is for Lilypad and U is for Uno. Did you select the Lilypad when you used Nick's sketch?
69  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 01:50:17 pm
ok, Then. First some theory while I familiarize myself with using the Arduino as an ISP (I have owned several programmers since many years ago, so I have never tried this part.):

When starting with a bare chip, it is programmed in the factory with the internal clock set for 1MHz. This is to give it a safe clock for initial setting of fuses and programming. So, the first thing that we have to do is to program the fuses. We are going to have to do things a bit oddly now because when you used Nick's sketch, it set the fuses to using an external 16Mhz crystal (actually anything between 8 and 16Mhz, really.) So now you will not be able to access your chip at all without an external clock. As it is, your chip is only going to work in the Uno socket.

So our first hurdle is going to be to figure out how to reprogram the fuses in your bare chip. That is going to be a bit difficult because you need a fully working Uno to be your programmer, but at the same time we need your bare chip IN the uno. I *think* our best option is to do some modifications to Nick's sketch and output a clock on another pin that will get fed into your chip's clock pin. And also to modify Nick's sketch so that it sets your fuses back to the factory settings. We will deal with the bootloader after we are successful with this part (and trust me, this is going to be a bit tricky.) We are essentially doing a 'recovery' which is tricky even with the proper tools. I have done that before, though.

I am fetching Nick's sketch to look at it and make the necessary modifications.

(BTW, in the future, I would definitely recommend just getting a programmer. These are really cheap on eBay and they work just fine.)
70  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 01:25:55 pm
ok, right away I see a few problems. First is that you are picking the 16MHz bootloader, but trying to use the internal clock (which is actually initally set for 1MHz). Fuses are being programmed into your chip by Nick Gammon's sketch, but those fuses are set for a 16MHz crystal.

This would explain why it works in your Uno, but not on the breadboard. This would also explain your programmer not responding error.

So, if I understand you correctly, you would like to have a standalone 328P using the internal calibrated RC clock at 8Mhz. That's fine, we can do that, but let me make sure that is what you want before we start walking through that.
71  Using Arduino / Project Guidance / Re: Rover two way R/C & Camera feed transmitter on: April 12, 2013, 09:16:46 am
I would personally immediately give up on the thought of trying to transmit the video portion through the Arduino. Just get a wireless camera and receiver with the range you want. Keep the video part separate.

Now, you want two way communication for everything else. The xbee is a well supported (lots of example code, shields, etc...) wireless transceiver for the Arduino for doing that. This would handle the transmission of your RC commands, sensors or whatever else you plan to have on your rover (like turning on/off the camera, IR LEDs, Pan/Tilt.)

You are probably going to want to overlay stuff on the video. For that, look at https://nootropicdesign.com/ve/ (but there are plenty of other projects out there just google 'arduino video overlay'.) This would allow you to use a single LCD for both the video and for status messages or whatever else you want to display.

As I always recommend (well, really it is absolutely essential), sit down and spend some time thinking about your project and draw up a block diagram. Once you have the block diagram, break out the 'blocks' and define each one. Once you can't break the project down any further, then start working on one block at a time.

For example, at the very top level you will have your rover and your ground station. For each one, you need a block diagram of what is involved in it. Both are going to need power supplies. This would be a 'block.' At this point, you don't need all the specifics of how that block works (and usually this is the last block to define because it will depend on the power requirements of the other blocks.) Within the rover, you will have your camera and a transmitter. This is a block. To define that, you need to find an appropriate camera and transmitter that will fit your requirements (weight, resolution, range, power..)

Etc... etc...

Maybe you have done all this already, but it doesn't appear that way from the vague description you have given. But if you have not, you need to do this before you even start buying anything or even asking what to buy.
72  Using Arduino / Microcontrollers / Re: I wish that there is Ruggeduino Mega. on: April 12, 2013, 06:51:24 am
Not sure if this is helpful, but the IO protection on the ruggeduino is simply a 24V 220 ohm PTC thermistor (PN PRG18BB221MB1RB)

This should be an equivalent through-hole part:
http://www.mouser.com/ProductDetail/Vishay/TFPTL15L2200FL2B/?qs=sGAEpiMZZMvQRzVR7o8pIcPrhnnD25wXmlNEFnBMIZ0%3d
73  Using Arduino / Project Guidance / Re: creating a controllable tens machine on: April 12, 2013, 05:40:58 am
That's the main reason for my hesitation about posting up a complete design for one of these. So many things could go wrong, especially with an experimenter's unit where people can muck with software and do things like turning both electrodes on at the same time. Of course, that type of stuff could be fool-proofed in hardware, maybe even enough to make me feel comfortable posting something, but then the design would get pretty complex. An easy solution is to use resistors in series with the electrodes to limit current, but then that can reduce its overall effectiveness. I bet the cheapy versions of these handle it that way.

The transformer idea is interesting and not one I have messed with before, so I have been sitting by just watching the thread. smiley
74  Using Arduino / Microcontrollers / Re: I wish that there is Ruggeduino Mega. on: April 12, 2013, 05:16:50 am
What are you looking for that ruggeduino has in particular?
75  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 12, 2013, 05:15:00 am
I completely understand. You have had problems for quite a while now. I am willing to walk you through it if you are willing to start at the beginning. So many different things have been tried by now that I think much has gotten screwed up. At that point, it is better to just start from scratch.

I am trying to go through all the posts to gather information about your set up, but perhaps you can more quickly answer these questions (I may have asked some already...):

What chip are you using? ATmega328P?
What is the frequency and what type of clock? I couldn't find that information yet. You mentioned not having a 16MHz crystal, but what are you using? 8MHZ? Resonator? Internal?
What bootloader? I see you said from Nick Gammon's sketch, so I am trying to figure out which bootloader that is uploading.
Do you have a programmer? If not, we might want to do the Arduino as ISP method instead so we have more control over what is getting installed.

I would also like you to remove all version of Arduino that you have installed and do a fresh install of 1.0.3. We can always move on to 1.5.2 once we get things working.

Once I know the above information, we will make a proper boards.txt file and walk through it together.
Pages: 1 ... 3 4 [5] 6 7 ... 57