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 & HelpIntegration › Wiring not running user programs on custom board

Page Index Toggle Pages: 1
Wiring not running user programs on custom board (Read 5982 times)
06/08/08 at 14:41:01

perroloco   Offline
YaBB Newbies
I Love YaBB 2!
Spain

Posts: 12
*
 
Hi there!

Just downloaded wiring 0016, and i'm trying to use it with an old custom board i did some time ago. Its a very simple breakout board with a 16Mhz oscillator, similar to the wiring one. It only has a max232 tied to both uarts.

Steps done:

1) Downloaded the bootloader from the wiring SVN  (http://wiring.uniandes.edu.co/source/trunk/wiring/bootloader/stk500boot.hex)

2) Burned the bootloader inside the Atmega128 using my STK500 board ISP connector.

3) Programmed fuses on this way (with the STK500):
EXTENDED: 0xFF
HIGH: 0xCC
LOW: 0x3F

4) Connected a led to PG2


Things working:

The bootloader seems to work. When i reset the atmega128 the led at PG2 is ON for 8 secs and then it goes OFF, so the uC looks alive and working.

Using the "Upload to I/O board" option of the wiring editor is working. AVRDude does the veryfing process and ends OK. To be sure i used the AVRStudio+STK500 board to read the entire flash and i can confirm that the user program is at the beginning of the flash, so the bootloader is working.


But my problem comes with the user program (wiring sketch), i'm using this to test:

Code:
void setup()
{
    pinMode(50,OUTPUT); // Set PG2 as output
}

void loop()
{
    digitalWrite(50,HIGH); // Set led ON
    delay(500); // Wait 500 msec
    digitalWrite(50,LOW); // Set led OFF
    delay(500); // Wait 500 msec
}
 



It's supossed that the led at PG2 should blink... but...

The program compiles OK on the wiring editor, and also uploads fine, then i reset the  board and the LED is ON for 8 secs (bootloader running), then it goes OFF and doesn't blinks!

I've also tryed with some Serial.begin / Serial.print() programs, and it doesn't work, so it seems USER programs are not running at all...

Maybe i'm missing something? Maybe wrong fuses?
Any idea?
 
IP Logged
 
Reply #1 - 11/22/08 at 18:42:08

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Wiring uses Timer0 for controlling things like delay, millis() etc, the 32Khz XTAL is attached to the timer0 pins and needed for Wiring to work properly
 
IP Logged
 
Page Index Toggle Pages: 1