Chronodot and LoL Shield conflict HELP!

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Chronodot and LoL Shield conflict HELP!

Post by adafruit_support_rick »

Please post your latest sketch and the output. Before you do that, however, put a delay(1000) after every Serial.print statement you've got left. The characters from print go out to the console asynchronously, so you could be hanging someplace AFTER the print, even if the output never shows up on your console.

GoolGaul
 
Posts: 10
Joined: Fri Feb 24, 2012 11:17 pm

Re: Chronodot and LoL Shield conflict HELP!

Post by GoolGaul »

Sketch:

Code: Select all


/*
DS3231_test.pde
Eric Ayars
4/11

Test/demo of read routines for a DS3231 RTC.

Turn on the serial monitor after loading this to check if things are
working as they should.

*/

#include <DS3231.h>
#include <Wire.h>
#include <Charliplexing.h>

DS3231 Clock;
bool Century=false;
bool h12;
bool PM;
byte ADay, AHour, AMinute, ASecond, ABits;
bool ADy, A12h, Apm;

byte year, month, date, DoW, hour, minute, second;

void setup() {
	// Start the I2C interface
	Wire.begin();
	// Start the serial interface
	Serial.begin(9600);

delay(1000);

    Serial.println(" init ");       //  <-- This prints, ++
delay(1000);
//    LedSign::Init();                //  <-- when this is enabled
delay(1000);
    Serial.println("made it");      //  <-- this doesn't print ++
delay(1000);                        //  <-- Nothing after the LedSign command executes
}

void loop() {
	// send what's going on to the serial monitor.
	// Start with the year



	Serial.print("get time"); delay(1000);
	Serial.print('\n');
	delay(1000);

	// Display the time once more as a test of the getTime() function
	Clock.getTime(year, month, date, DoW, hour, minute, second);
	Serial.print(year, DEC);
	Serial.print(month, DEC);
	Serial.print(date, DEC);
	Serial.print(DoW, DEC);
	Serial.print(hour, DEC);
	Serial.print(minute, DEC);
	Serial.println(second, DEC);
}


With LedSign::Init() active, the monitor window simply shows:

init

With LedSign::Init() commented out the monitor window shows:

init
made it
get time
00000327
get time
00000329
get time
00000331
and so on. (yes, it's not counting properly, but it is counting...

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Chronodot and LoL Shield conflict HELP!

Post by adafruit_support_rick »

Hmmm…
Actually, it is counting properly, since you've got 2 1-second delays in your loop.

Well, I'm baffled. What kind of arduino and what version of the IDE are you using?

Is there anything else attached? Have you changed anything on the board? Are you targeting the right board in the IDE?

GoolGaul
 
Posts: 10
Joined: Fri Feb 24, 2012 11:17 pm

Re: Chronodot and LoL Shield conflict HELP!

Post by GoolGaul »

I am using an Arduino Pro-Mini Clone: http://www.jayconsystems.com/product_de ... prod_id=64
Nice board, and TINY...

I also just tried the same sketches on a Duemilanove with the same exact results (locking up at LedSign::Init(), but counting by 2's when the command is commented out), using a different Chronodot (I bought a few as I am making multiples of my project).

I am using IDE 1.0, and have updated all libraries used to the fit the changes that (from what I can see) apply, like .read instead of .receive, etc.

Investigating the possiblities of the wrong board, I started tinkering with those settings...

"Pro Mini 5V 16Mhz w/328" is how I've had i set. Everything else I have done except trying to get these to things to work together has worked flawlessly at that setting for that board.

I tried many other settings, if I didn't get AVR-Dude errors, the sketch does the same thing, quit at that init.
the errors i got when trying different boards were:

avrdude: stk500_getsync(): not in sync: resp=0x00

on the Pro-Mini board, there is a rotary encoder (Pin11 = Encoder Low side; Pin12 = encoder high side; Pin13 = power for encoder, PinA1 = Encoder button) Chronodot ( PinA4= SCL from DS3231; PinA5 = SCA from DS3231, plus 3.3V and gnd from the usual)and a 9-pin charlieplex network on pins 2-10.

On the Duemilanove, I had an encoder (on different pins) a Chronodot, and a single LPD-6803 PWM LED controller (again for other testing purposes).

I am beginning to think I might just have to abandon ship on the Charlieplexing and use WS2803's or something...

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Chronodot and LoL Shield conflict HELP!

Post by adafruit_support_rick »

The LOLShield uses digital pins 2 through 13, so it's not going to play nicely with the encoder. The LPD6803 is serial, running on pins 0 and 1?

Is all this other stuff hooked up and powered while you're trying to make these sketches work? How are you powering the arduinos? From a wall-wart or just with USB? The LOLShield is going to source and sink a fair amount of current. Off hand, I don't know how much, but the ATmega328 does have limits. Quoth the data sheet:

Code: Select all

Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.
Although each I/O port can sink more than the test conditions (20 mA at VCC = 5V, 10 mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100 mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100 mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.
As the current load goes up, pin voltage goes down. Maybe the LOLShield just pushes the whole thing over the edge.

GoolGaul
 
Posts: 10
Joined: Fri Feb 24, 2012 11:17 pm

Re: Chronodot and LoL Shield conflict HELP!

Post by GoolGaul »

for the pro mini with the charlieplex, I am not using the LoL shield, I made my own 60 LED network, and since it's a clock, no more than 9 LEDs are lit at any given moment. 1 for hours, 1 for minutes, 3 for hours, and 4 others, 1 @ :00 :15 :30 & :45, so it's not a power issue. It doesn;t even get to the point of moving any current around, that is the problem.

My Charlieplexed clock sketch works just fine using millis() to generate seconds for testing, and there are no delay()'s in the sketch - It's bad form, no? I ran it for 2 weeks without a glitch, then I used the DS3231 with manipulating the Charlie network with individual digital.Write (xx, HIGH/LOW) and so on, and it works, but the charlieplexng is brighter has 7 brightness levels. The programming structure is almost identical to a color version (using those LPD6803's), so I can make 1 sketch that covers both versions of the clock.

I think I should post this issue to Arduino forum...

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”