Show Posts
|
|
Pages: [1] 2 3 ... 19
|
|
1
|
Using Arduino / Microcontrollers / Re: Use Atmega8/168 with Arduino UNO instead of atmega328p
|
on: March 30, 2013, 08:44:18 am
|
you still talking about external oscilator, but where i connect him? (Im trying to burn optiloader to atmega8 16PU)
I'm not sure what this question means. Let me see if I can better explain. The Atmega chips have an internal RC oscillator that has some level of calibration. I do not know the details. On a new ATMEGA328, by default it is set to use the internal oscillator of 8MHz which is then divided by 8. Therefore any code you write for the chip should expect a clock frequency of 1MHz. This can be changed by altering the fuse bits. You can alter both the source from internal to external you can also alter the prescaler. I am told that the internal oscillator is not accurate enough to do reliable serial communications, however I have not found that to be the case. There may be a problem if I where trying to do very high speed serial while the chip is very hot or very cold. I just haven't had a problem. Now to set up the baud rate, your code will need to know the clock frequency. Your bootloader will need to set up the baud rate. Therefore, when the bootloader was compiled, it assumed some clock frequency. If it were compiled for an UNO it would have assume a 16MHz clock frequency because that is the frequency of the crystal on every UNO board. So, if you wanted to improve the performance of your UNO, you could replace the 16Mhz crystal with a 20MHz crystal. But if you do that, you will need a bootloader compiled for 20MHz. Otherwise, the baud rate will be shifted up by 25% just like the clock frequency. On the other hand, if you want to use the internal oscillator, it has a maximum frequency of 8MHz. Your standard bootloader will now have a baud rate half the expected baud rate. So you need a bootloader that knows the clock frequency is 8MHz. When I need to do this, rather than recompile the bootloader, I simply grabbed a bootloader for an older board that was already compiled for 8 MHz. Something like a Lillypad, although I don't think I used that one. I hope this helped a little.
|
|
|
|
|
2
|
Using Arduino / Project Guidance / Re: Tutorial for hacking a CP2102 USB from ebay and uploading a sketch to an Atmega
|
on: March 30, 2013, 08:15:47 am
|
This happened to me one time. I simply wrote the seller with a picture of what I received, and pointed out that the picture differed from what was advertised. The seller posted a replacement of the right type. eBay sellers usually dislike negative feedback. If what they sent does not match what was advertised then that is cause for negative feedback. On the other hand if you ordered the wrong one because you did not inspect the photos, or there where no photos to inspect, then the fault is yours. On the bright side, you should not have spent more that a morning cup of coffee on the board. I know that most people complain about the quality of parts from China, and they are right. However, for the savings, I am usually willing to put up with the lower quality to save some money. I do this as a hobby, I enjoy playing with these things. If I where making a production quality product, with my name on it, I would source my part with greater care. But I'm not, and I don't.
|
|
|
|
|
3
|
Using Arduino / Project Guidance / Re: how do I interface with a 4x4 keypad/
|
on: December 27, 2012, 05:59:02 pm
|
The link: is very similar to: The second link also contains a spreadsheet for calculating resistor values. I modified the spreadsheet to calculate values for a 4x4 matrix. The problem I have with this solution is that for the 3x4 matrix it uses 7 resistors of 6 different values. I would like to find a solution that uses 10 or 12 resistor of all the same value. Or maybe 5 or 6 resistors of one value and 5 or 6 of another value. The reason I am thinking this might be a better solution is that while the component count is higher, the cost of resistors goes down with volume. Rather than buy 6 packages of 5 to 10 resistors each, it would be cheaper to by 1 package of 100 resistors. Also, the tolerances are important. If I buy a 100 resistors they they were probably made at around the same time with the same material and if there is an error they are probably all off by about the same amount in the same direction. So if they are all low by 5% then the errors will probably cancel in a design that uses all the same value. Rather than 6-8 different values with some high and some low. Since I don't have a design, this is all assumption. There may also be an inexpensive SIP or DIP package out there that contains the appropriate resistor network. I just haven't come across it.
|
|
|
|
|
4
|
Using Arduino / Project Guidance / Re: Any experience with OV7670
|
on: December 27, 2012, 05:29:45 pm
|
|
This may be a solution. I will look at it some more.
However, it seems to be over-kill. The interface board costs more than the Arduino and camera combined. I was hoping to keep the cost much lower.
It may be that a solution does not exist with an Arduino and OV7670. The solution may be with a Raspberry Pi and a cheap web-cam. The Raspberry Pi costs about twice as much as an Arduino but has a lot of memory and power. The nice thing about the Arduino is that once you have a solution working with, say an Uno, you can move the design to a bare ATMega chip very easily. And the bare chips are only a couple dollars each.
|
|
|
|
|
5
|
Using Arduino / General Electronics / Re: How to connect this camera to arduino ?
|
on: November 08, 2012, 05:57:37 pm
|
but they will easily interface to an Arduino. Will they? How? The speak async serial at TTL level. So you would open a serial connection and read and write. Possible problems? Most Arduinos are already using the serial port to talk to the IDE. One exception is the MEGA2560 which has extra ports. A work around is the Soft Serial library which "bit bangs" the serial link.
|
|
|
|
|
7
|
Using Arduino / Programming Questions / Re: Help request interfacing a 4x4 keypad with Arduino
|
on: October 02, 2012, 07:44:46 am
|
|
Reading a 4x4 matrix keypad using 8 I/O pins if very common. However, I can find very little on using resistors and an analog pin. The typical method uses something like: (Matrix_Keypad.gif) However, something like this uses fewer pins: (Matrix_Keypad(analog).gif) The only problem is the number of different resistor values.
Does anyone have another design, maybe one which only uses 1 or 2 different resistor values?
|
|
|
|
|
8
|
Using Arduino / Project Guidance / Re: single board computer
|
on: August 04, 2012, 10:41:56 pm
|
There is an open-source hardware project call Beagle Board. It is sort of like Arduino in that respect. The boards are more expensive but have more memory and processing power. http://beagleboard.org/Many will run a flavor of Linux with good community support. After saying all this, I do not own a Beagle Board. I have seen them but I like to play cheap.
|
|
|
|
|
9
|
Using Arduino / Project Guidance / Re: Arduino VOIP - receiving commands through dialpad tones
|
on: August 04, 2012, 10:36:53 pm
|
Anyone has any idea how can create a project where the arduino would be able to placed on a VOIP network and would be able to receive commands through the dialpad from another voip phone calling it? I don't seem to find any documentation on something like this. Any input would help me out tremendously. Thanks guys.
I am not going to say that it can not be done but let's look at your question. Anyone has any idea how can create a project where the arduino would be able to placed on a VOIP network ...
Well VOIP is Voice Over IP. Yes you an place an Arduino on an IP network. Frequently that is done with an Ethernet Shield. ... and would be able to receive commands through the dialpad from another voip phone calling it?
It is my understanding that there are several VOIP protocols. The first that comes to mind is SIP but I am sure there are others. These protocols take the voice and command information and package it into packets. The packets are then routed on the network. Therefore assuming you know the protocol and packet structure, I assume that you could route those packets to and Arduino and decode them. I would suggest that you look at an open-source project called Asterisk. It is difficult to say what this project is all about but it is frequently used to control and route VOIP packets. It can also be used as a PBX. It can also be used to route Video packets for video conferencing. It is control by something called a Dial Plan which sounds simple and can be but is so flexible that it can get very complex very fast. You may be able to put up an Asterisk server and put logic in a dial plan to send commands to your Arduino. The Asterisk server will handle all the various VOIP protocols so you won't need to. It also has much more memory to be able to parse the route the packets. I know that this is not a direct answer to your question but I hope it helps.
|
|
|
|
|
10
|
Using Arduino / Programming Questions / Re: running more than one program
|
on: August 03, 2012, 09:39:22 pm
|
I can not disagree with most of what has been said. However I could disagree with a few statements You took everything I said out of context. Many new Arduino users need to make the transition from how their PC works to how an embedded microcontroller platform works. I specifically avoided all the pointless detail that you went into, to make for a change in thinking. I had no intention of writing a Wikipedia article on the differences between an embedded microcontroller and a PC. As I said, I can not disagree with most of what is said. Most of what has been said is correct. My perspective is to say that the PC and Arduino are more alike than different. The biggest difference is the available resources. I also see no need to lower the bar of possibilities. It may be more difficult but Real Time processing is possible. Multi-threading can be done. Running multiple programs is a possibility. All these thing have been done in the past, they can be done now. If someone want to run more than one program at the same time, point out the obstacles but also point to possible methods around or over those obstacles. Look at how the problems were solved in the past and at least consider tailoring a similar solution for the current environment. You are right as well that many Arduino users are new and only have PC experience, and modern PC experience at that. They don't remember Bill Gates wondering why anyone would ever want more that 640K of memory. A question like this is an opportunity to teach. Not to spoon feed the answer but also not the discourage. The Arduino takes me back to my first computer with only 4K of memory. It was a simpler time. It was a time when it was actually possible to know and understand all the hardware and all the software. I apologize if stepped on some toes. My intention was not to offend. It was to spur dialog and discussion.
|
|
|
|
|
12
|
Using Arduino / Programming Questions / Re: running more than one program
|
on: August 03, 2012, 02:19:50 pm
|
I can not disagree with most of what has been said. However I could disagree with a few statements The Arduino is based on a relatively simple microcontroller.
That has little to do with the ability to run a multi-treading operating system. The 8080 was a very simple processor, probably less powerful than the ATMega328, however, it ran MP/M, a multi user operating system. You are correct that the microcontroller has very limited resources and sharing those limited resources is more difficult It doesn't work like a PC. When it turns on, it starts executing code.
That is exactly what the PC does. When you turn it on it begins executing code. The difference is the code. Desktop and Laptop computer begin loading other another program, the operating systems, and the boot strap program then passes control to the OS. The only difference in the process is the nature of the program that is executed. I guess there is another difference. The non-volatile code in your PC is never changed where the non-volatile code in your Arduino is changed often. You as the programmer have full control over how that code gets executed.
And that's the truth. For good and for bad. If something is not working as desired, you got no one to blame but yourself. But when it goes right, you get to claim most of the credit.
|
|
|
|
|
13
|
Using Arduino / Programming Questions / Re: Source to UNO USB to Serial Chip
|
on: August 03, 2012, 01:48:54 pm
|
|
Great, I found it in \arduino-1.0.1\hardware\arduino\firmwares\arduino-usbserial
I will look it over.
I assume I can use the tools but not the IDE to edit and build this. The makefile should help.
Has anyone else attempted to enhance the functionality?
|
|
|
|
|
15
|
Using Arduino / Programming Questions / Source to UNO USB to Serial Chip
|
on: August 03, 2012, 08:53:50 am
|
|
Where could I find the source code to the USB to Serial chip on the UNO?
The board has a nice ICSP header just begging to be used. I would like to enhance the functionality but I don't want to break anything either.
I would like to be able to do some of the things that the Leonardo can do. Having two separate chips can have it's advantages. In the old days it was call distributed processing.
Is anyone else doing anything like this?
|
|
|
|
|