Show Posts
Pages: [1] 2 3
1  Using Arduino / Programming Questions / Re: Problems with "Exit;" on: September 28, 2012, 09:37:06 am
http://www.cplusplus.com that's where I looked it. But I guess I miss understood it. 'Process/function/loop all the same.' But what does exit do in Arduino or GCC, what assembly code it creates. I wonder why does GCC not know that embedded cpu has no OS to exit. (And give an error.)
2  Using Arduino / Programming Questions / Problems with "Exit;" on: September 28, 2012, 08:51:16 am
I tried to exit a loop with exit. Like this.
Code:
  if (vara>171)
    {
    Dacout0(vara);
    exit;
    }
It did not work. Break works, so there is not a problem but I'm curious. I looked up the word Exit in C++ web references and it is there and there are no errors from compiler either.
3  Using Arduino / Microcontrollers / Re: What's the best way to clone the whole SW in CPU and preventing others doing it on: September 11, 2012, 07:26:11 am
True.

With those copy protect bits direct copying is not too easy.
4  Using Arduino / Programming Questions / Re: What is the best way to powering down the CPU during AD conversion? on: September 10, 2012, 04:15:47 am
The problem is in "if it works". I would not like to test it here. Besides there will be new CPUs, they may use different registers and so on.

But I found this:
Sleep during ADC conversion
http://www.gammon.com.au/forum/?id=11488

I hope it works.

5  Using Arduino / Project Guidance / Re: Does AnalogRead() use any timer ? on: September 10, 2012, 02:36:34 am
Does it run in Arduino? I mean are those include files you use in Arduino IDE too?
6  Using Arduino / Programming Questions / What is the best way to powering down the CPU during AD conversion? on: September 10, 2012, 12:56:17 am
Hi

I found some examples of code in the forums about shutting down the CPU to minimise noise. Those samples and posts were a bit old. From 2010 and earlier. What is the latest info about doing this.

My board is crowded and because of that PWB wiring is not optimal. We have got +-4,,,+-8 counts of noise in the results.

Regards
Leif
7  Using Arduino / Microcontrollers / Re: A working DIY Mega2560 R3 is born on: August 31, 2012, 05:23:22 am
No you wont but if you have a windows machine you can reach your own. I mean it is in Arduino directory already if you have installed it.

Thanks
8  Using Arduino / Microcontrollers / A working DIY Mega2560 R3 is born on: August 31, 2012, 04:39:49 am
I just uploaded a simple skecth to my Mega processor. And it worked. I had some difficulties getting it working, I could not find all the sw and settings. So I list the links to them here to help people finding them.

I burnt them with AVR studio and AVRISP2, because that combination worked here.

Processors
Atmega2560 with Arduino bootloader
Atmega 16U2 with firmware

Bootloader for Atmega2560
C:\Program Files\arduino-1.0.1\hardware\arduino\bootloaders\stk500v2\stk500boot_v2_mega2560.hex

Firmware for Atmega 16U2
https://github.com/arduino/Arduino/blob/master/hardware/arduino/firmwares/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex
(click RAW)

Fuse settings for Atmega2560
http://arduino.cc/forum/index.php/topic,119782.msg901524.html#msg901524

fuse settings for Atmega 16u2
http://arduino.cc/forum/index.php/topic,96706.0.html

I hope this helps, and of course if there are errors, write a message
9  Using Arduino / Sensors / Re: Potential (voltage) measurement on: August 30, 2012, 02:27:48 am
I input voltages must within certain limits. Even if you measure their difference. And your Arduino and your voltages must have a common ground so that you can tell(measure) what the voltages are.

If those voltages are too much for Arduino you can use an instrumentation amplifier for that. It is a special chip to make voltage differences to start from ground. Like 11V and 12.23456V becomes 1.23456V.
Leif
10  Using Arduino / Project Guidance / Re: Arduino MEGA current draw predicament on: August 29, 2012, 01:48:49 am
I remember old glowing wire 7-segment displays. They did look good, but in use they burnt out their segments, so I hope you can easily change your lamps/segments when they burn out.

11  Using Arduino / Microcontrollers / Serial error from new Nega 2560 on: August 28, 2012, 07:58:17 am
I tried to send some keystrokes to a new Mega2560 clone. I got an IOexception from java.

java.io.IOException: Input/output error in writeArray
   at gnu.io.RXTXPort.writeArray(Native Method)
   at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1124)

Clip
Clip

   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

There is a problem in this board, but what and where. The mega16U2 seems to work, it looks like a serial port in Device manager. And the main Cpu is working also, I can program it with the Avrisp. Its serial output is working too.

I think the problem is in Mega16U2. But it has its firmware inplace. What else?
12  Using Arduino / Microcontrollers / Re: Uploading the sketch does not finish on: August 27, 2012, 01:33:47 am
I see.

I have try that reset pin. I managed to program the 2560 with AVRstudio and AVRISP2, so this is not so urgent any more.
13  Using Arduino / Project Guidance / Re: Power supply self control using transistor on: August 27, 2012, 01:31:17 am
If the original poster has problems with electronics, it is best to use module or or whatever previous poster suggested.
14  Using Arduino / Project Guidance / Re: What fuse settings for Mega16U2 on: August 27, 2012, 01:28:18 am
Good questions.

I know that there is somethingg working in the USB chip, because now there is a COM port in the PC. And the devicelist shows something like 2560.

When I wrote a short test program/sketch, all went fine until IDE started to download that into the Arduino board. That download would newer finish
15  Using Arduino / Project Guidance / Re: Power supply self control using transistor on: August 24, 2012, 07:14:27 am
Almost

For instance you start you computer by setting S to active (that may be 0 or 5V depending your circuit) and your computer turn it off by setting R active. By the way, I said wrong it is better to use PNP transistor like BC558 or BC640 and so on. When you use PNP correctly, you connect /Q to base.

But I am not going to design this for you, see Google.
Pages: [1] 2 3