Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumProgramming Questions & HelpPrograms › Wiring fails to create working programs ...

Page Index Toggle Pages: 1
Wiring fails to create working programs ... (Read 7424 times)
06/13/08 at 22:45:21

perroloco   Offline
YaBB Newbies
I Love YaBB 2!
Spain

Posts: 12
*
 
Hi,

I'm trying to use wiring on a custom breakout board, and it fails to create working programs.

The bootloader is working fine, and if i compile my programs (self-made, not the wiring ones) just using a makefile and avr-gcc it works fine (able to upload using the wiring bootloader and running as expected), so i assume the Atmega is OK and the fuses, bootloader ,etc are OK.

Can somebody send me a known-working .hex generated with wiring? Just a "LED ON" test or some "hello world" over the serial.

I'm suspecting some misconfiguration on the avr-gcc stuff on my system (ubuntu 7.10) or some other weird stuff.


Also, can somebody (Barragan?) confirm the fuse values on the original wiring board?

Thanks in advance.
 
IP Logged
 
Reply #1 - 06/13/08 at 22:52:49

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Fuses are:

boot size 1024 words
CKOPT enabled
Boot reset vector enables
Brown Out detection 4V
Ext Xtal 16CK + 64ms

But the problem might be related to the 32K Xtal connected to Timer0 in the circuit diagram. That´s Wiring main clock used in commands like delay() etc.

 
IP Logged
 
Reply #2 - 06/13/08 at 23:02:00

perroloco   Offline
YaBB Newbies
I Love YaBB 2!
Spain

Posts: 12
*
 
Uhmm...the 32K Xtal ...sounds reasonable, didn't noticed about it. Thank you Barragan.

Anyway, im doing a simple digitalWrite() on my test program, no delays.

I ended up testing with this:

Code:
void setup()
{
  DDRC=0xFF;
  DDRG=0xFF;
  DDRD=0xFF;

}

void loop()
{
  PORTG=0x55;
  PORTC=0xAA;
  PORTD=0xFF;
}  



Maybe there's some internal init routine into the wiring libs, using the xtal even when i'm not using any delay, causing the program malfunction?


 
IP Logged
 
Reply #3 - 06/13/08 at 23:04:42

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
The init is needed because when declaring an object and initializing it requires the usage of commands like delay() internally. If the init starts the main clock so the time commands will work as expected.
 
IP Logged
 
Reply #4 - 06/13/08 at 23:26:30

perroloco   Offline
YaBB Newbies
I Love YaBB 2!
Spain

Posts: 12
*
 
Didn't remember... i've a 32K768 XTAL tied to PG3/PG4, so this is not the problem.

I still insist on some misconfiguration or any other weirdness on my ubuntu 7.10 causing bad compilation or something.

What is the J9 jumper on the original board for?

My board is exactly like this:

http://www.ere.co.th/download/emb128_050915A.pdf

I started prototyping with the Ere one, and ended up doing my own but, is based on this board...

I don't see any reason for wiring not working on this board Sad



 
IP Logged
 
Reply #5 - 06/14/08 at 10:33:58

perroloco   Offline
YaBB Newbies
I Love YaBB 2!
Spain

Posts: 12
*
 
PROBLEM SOLVED!!!

It was a bad soldering problem on the 32K xtal... i've resoldered it and now it works fine.

Thanks for helping Barragan! Smiley
 
IP Logged
 
Reply #6 - 06/16/08 at 00:28:13

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
good, I am glad you made it.
 
IP Logged
 
Page Index Toggle Pages: 1