Clockit problems

I recently downloaded the schematic for the clockit kit. I verified that I wired it correctly, but after I loaded the sketch for it. "which I got from sparkfun's website." All it'll do is display a "6" on the second digit of the clock display, & the alarm goes off constantly. I initially thought that I maybe have burned up the ATmega328 I'm using , but upon further examination, I determined that to be false. the original kit used an ATmega168 for the micro controller. But since the 168 & 328 have the exact same pinout. Is there a flaw in the sketch that I'm not aware of?
I've taken to removing the piezo speaker for obvious reasons. Oh yeah, I'm using a 4 digit 7 seg. display module "Common Anode"... I've attached the sketch as a text document.

clockit_sketch_ver10.txt (19.1 KB)

Are you using the atmega 328 on a breadboard/standalone, or in an arduino board?

Oh yeah, I'm using a 4 digit 7 seg. display module "Common Anode"

Well it looks like you got that part exactly wrong.

Don

wford>> I'm trying to use the ATmega328 on a breadboard for now, with eventual plans to build a more permanent version. the common anode display I'm using has a factory "charlieplex" config. the digit pins Are anodes, and the segment pins are cathodes. The malfunctioning happens regardless of whether the display is hooked up or not. P.S. sorry it took so long to get back to you. I've been busy lately.

floresta>> What exactly did I get wrong? was it my display type, or my programming? Please...Elaborate!

FYI: for those that have experience with this next chip... I have a "MAX7219" 8-digit LED driver, and I'm trying to figure out how to use my Duemilanove to drive it. I'm trying to build an alarm clock, since I'm not having much like with cloning the "clockit". I thought instead, using my duemilanove to actuate the MAX7219 decoder/driver. so the sketch can been simplified. considering I'm not fluent in the Arduino code language yet. I want to use as few I/O pins as possible. if I can just make a preprogrammed sequence of HIGHs & LOWs in the correct order. with a provisional Potentiometer to increase the loop speed.(so I can set/reset the clock) I think this could work. but the MAX7219 is new to me, and I need to know exactly how to get it to do what it does. Any help would be greatly appreciated. Thanx in advance.

Might want to take a look here

http://arduino.cc/playground/Main/LEDMatrix

floresta>> What exactly did I get wrong? was it my display type, or my programming? Please...Elaborate!

Which of these two was mentioned in my last response? Hint: it was emphasized in red.

Don

Might want to take a look here

http://arduino.cc/playground/Main/LEDMatrix
[/quote]

Meden>> thanx, this helps alot.

I wanted to make sure that (if you were using an actual arduino) you had the pins connected correctly, since an arduino pin 7 is different from the atmega pin 7, etc.

If the alarm is sounding constantly, and only 1 digit is working, it kind of sounds like you may have the wiring incorrect. I set one of these up on a breadboard before and had weird issues with the display. A triple and quadruple check of the connections fixed it.

I also, for some weird reason, had an issue if I left the programming cable connected. I was using one of these: SparkFun AVR Programming Adapter - BOB-08508 - SparkFun Electronics. I think the problem was in the programming adapter though.

WFORD>>>I'm using the chip from my arduino, but I'm using the ATmega328 itself On a breadboard instead of on the duemilanove. XD

WFORD>>> I see what your saying. do I need to remove the bootloader and use ARVdude? I ran the skecth in with a USB port, Was that the wrong way? I have to wait to get the ISP programmer til' I can afford it. :slight_smile:

I don't think that is necessary.

go to the spakfun tutorials and get the blink1mhz.c and see if you can get that to work. If it does, then your problem is probably in how the 7-seg is wired up.

WFORD>>> Its malfunctions regardless whether the display is hooked up at all.

WFORD>>> I aslo switched over to A common cathode display, someone else in the forum told me that the common anode diplay was wrong. :roll_eyes:

Yeah, that would explain why your display is not working.
But it doesn't explain why your alarm goes off constantly.

If you didn't get your 7 segment display from sparkfun, have you verified that the pins on it match the pinout of the one in the schematic?

I would check the following:
Make sure that you can actually get some kind of code to work on the atmega. i.e. blink a single LED
Then I would check that I knew the pinout of the 7segment display.

Also, you don't have the atmega backwards do you?

WFORD>> The display did not come from Sparkfun, but is an equivalent module with identical pin config. The ATmega is inserted correctly. My wiring is verified for correctness. Atmega passed all testing I can think of, including running in a different sketch. It all works fine as seperate pieces, but when assembled...
The only thing I can think of is that the sketch is somehow at fault. it maybe the wrong one or its wrong in the first place. I just don't get what is wrong with this thing. :~ :0

weird.
The sketch works. I have done the same setup, with a non sf display too...
there is another version on the product page that someone made that is better (it debounces the buttons, etc). maybe give that code a try.

http://forum.sparkfun.com/viewtopic.php?p=75266#75266

WFORD>>>Thanx I'll Try it, wish me luck. :slight_smile:

Thank you fellow forumers for all your help, but my computer is broken, and I won't be online for awhile. see you all when I have it fixed. I'm on a borrowed a computer to send this. Again Thanx.