linear1 forums
[part of the linear1 network]
+ [linear1 case mods]
+ [LED Center]
+ [privacy policy]
Welcome, Guest. Please login or register.
March 20, 2010, 09:56:44 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Login Register

linear1 forums  |  LED discussion  |  LED project showcase  |  Topic: Minidot 2 - The holoclock « previous next »
Pages: [1] Print
Author Topic: Minidot 2 - The holoclock  (Read 1326 times)
rgbphil
Smart like tractor
**
Offline Offline

Posts: 11


« on: May 17, 2007, 12:25:47 AM »

Hi,
I've recently updated my Minidot clock with a cross fade function on the charlieplex display which may be of interest to people.
http://www.instructables.com/id/E11GKKELKAEZ7BFZAK/
Phil
Logged
SteveyG
Smart like tractor
**
Offline Offline

Posts: 46



« Reply #1 on: May 17, 2007, 04:08:03 PM »

Looks really pretty! Though I'd have dropped the 32kHz crystal and just derived the time from the 20MHz crystal.
Logged

Hi everyone, my name is Steve ... and *sigh* ... I'm an LED addict.
rgbphil
Smart like tractor
**
Offline Offline

Posts: 11


« Reply #2 on: June 25, 2007, 12:08:26 AM »

Thanks for the compliment.

As for the 32khz crystal....I've looked into that. The problem with deriving timing from 20MHz is that you're divisor will not be an exact multiple or fraction of a second. This means a tiny error will build up over time and the clock will be wrong eventually.

There are ways of correcting and compensating for this, but they're pretty complex. It was easier to use a watch crystal. An alternative would have been to use a 3.2768Mhz crystal (as the main oscillator) or any other crystal which can be a binary divisor...ie 3.2768kHz (or MHz) is 2^15. This means the timer can run free, clicking over the RTC variables pretty accurately.

There are numerous discussions over at the Neons and Nixies yahoo group about this sort of thing.

Phil
Logged
SteveyG
Smart like tractor
**
Offline Offline

Posts: 46



« Reply #3 on: July 01, 2007, 03:05:56 PM »

You can always exactly divide down a crystal provided it is above 32.768kHz, and it isn't difficult in the slightest, take a 20MHz crystal for example:

With a PIC, the period of each instruction will be 200ns. Now preload one of your timers with the value 0x3CB0, and you'll get an interrupt every 0.01s. Then just have a counter at the start of your timer's ISR, to count to 100. That will give you 1 second exactly. No jitter, no error. Uses 7 instructions for your ISR so a total of 700 out of 20000000 instructions per second used.

Logged

Hi everyone, my name is Steve ... and *sigh* ... I'm an LED addict.
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #4 on: July 01, 2007, 06:27:27 PM »

Uses 7 instructions for your ISR so a total of 700 out of 20000000 instructions per second used.

a pic at 20mhz should execute 5mips ... since all instructions are at least clk/4

I think the avr flavor of microcontrollers runs each instruction at clk
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SteveyG
Smart like tractor
**
Offline Offline

Posts: 46



« Reply #5 on: July 02, 2007, 01:26:49 PM »

Uses 7 instructions for your ISR so a total of 700 out of 20000000 instructions per second used.

a pic at 20mhz should execute 5mips ... since all instructions are at least clk/4

I think the avr flavor of microcontrollers runs each instruction at clk


Thanks - it was a typo Smiley
Logged

Hi everyone, my name is Steve ... and *sigh* ... I'm an LED addict.
Pages: [1] Print 
linear1 forums  |  LED discussion  |  LED project showcase  |  Topic: Minidot 2 - The holoclock « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.217 seconds with 19 queries.