Created Wed, 24 Oct 2012 04:26:03 +0000 by Herseinc
Wed, 24 Oct 2012 04:26:03 +0000
hi to all!!
I have a little problem, I want to do a waveform generator , i have the code,.http://www.instructables.com/id/Arduino-Waveform-Generator/?ALLSTEPS but is in code for arduino. When i want to debug, the software, sends me many errors.
sketch_oct21a.cpp: In function 'void setup()': sketch_oct21a.cpp:77:3: error: 'DDRD' was not declared in this scope sketch_oct21a.cpp:78:3: error: 'DDRC' was not declared in this scope sketch_oct21a.cpp:79:3: error: 'DDRB' was not declared in this scope sketch_oct21a.cpp:82:7: error: 'cli' was not declared in this scope sketch_oct21a.cpp:84:3: error: 'TCCR1A' was not declared in this scope sketch_oct21a.cpp:85:3: error: 'TCCR1B' was not declared in this scope sketch_oct21a.cpp:87:3: error: 'OCR1A' was not declared in this scope sketch_oct21a.cpp:89:19: error: 'WGM12' was not declared in this scope sketch_oct21a.cpp:91:19: error: 'CS10' was not declared in this scope sketch_oct21a.cpp:93:3: error: 'TIMSK1' was not declared in this scope sketch_oct21a.cpp:93:19: error: 'OCIE1A' was not declared in this scope sketch_oct21a.cpp:112:7: error: 'sei' was not declared in this scope sketch_oct21a.cpp: At global scope: sketch_oct21a.cpp:188:4: error: expected constructor, destructor, or type conversion before '(' token
The problem is with the ports names. I search this info in the internet, but I don't found anything.
I'm an inexpert in that team...
Thanks...
Wed, 24 Oct 2012 16:24:23 +0000
Hello,
For the most part the errors you are seeing are caused by the fact that the software is talking directly to control registers that are specific to the processor used on the Arduino UNO.
The Uno32 processor has similar control registers but they have different names and I'm sure that they operate differently.
I looked at the Instructables project and noticed that it is using an UNO prototyping shield to build the hardware. That shield won't work with the Uno32 because you'll need access to pins on connectors that don't exist on the UNO. NKC Electronics has a prototyping board for the Uno32 that should do the job.
It looks like you'll need to go through the specs of both processors to figure out what needs to be done. You'll also need to address the issue of how interrupts work on the Uno32. I've provided some links to help get you started.
Good luck on your project - Doug
Atmel uP (UNO) [url]http://www.atmel.com/devices/atmega328p.aspx?tab=documents[/url]
Microchip uP (Uno32) [url]http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532434[/url]
NKC Uno32 Proto Shield [url]http://www.nkcelectronics.com/Protoshield-KIT-for-chipKIT-Uno32_p_226.html[/url]