I've already tried that skimask. . .
It really puts all the PBP routines off . . .
LCDOUT takes like 3 seconds to print 16 digits . .
I've already tried that skimask. . .
It really puts all the PBP routines off . . .
LCDOUT takes like 3 seconds to print 16 digits . .
Which is exactly what I'd expect...unless you write the code in assembly, PBP will time everything like it was running 4Mhz. Maybe try 'lcd_commandus' and lcd_dataus' both set to 1 and see if it works like that at 32khz.
Which PIC are you using this time?
There is a clock switching feature in most newer PICs these days, can switch between the main (4Mhz or whatever) and the internal 32/37/40khz (depends on the datasheet you're looking at) 'backup' oscillator if configured correctly. I use it all the time to save power.
I'm using a 16F84A so there is no question of internal oscillator.
I tried several other things besides LCDOUT. Even FOR and WHILE statements take a lot o ftime to execute . . .
I used a external 32.768Khz oscillator.
Just to verify that the F84 was running at 32.768Khz, i tried a clock code on it and it does keep accurate time . . . down to a second a day.
If you're running 32.768khz, everything is going to take a lot longer to execute.
The clock is 32.768khz, but the PIC is only executing instructions at 8.192khz (Fosc/4), and if you're code has a lot of call's, gosub's, returns, anything that takes the code to 'somewhere else', it'll run half that fast again (4.096khz, Fosc/4 + one extra instruction for each 'somewhere else').
So, what are you asking? What's the point?
Last edited by skimask; - 31st May 2007 at 16:12.
this is a very belated response to shahidali55.
I've added a tiny bit of code to "ds1302_user_interface.txt" to enable trickle charging. This is a small feat, but helped me understand how the register addressing and definitions are used.
edit: I'm using a 5v 0.47f supercap which doesn't need diodes or resistors, so "trickledef" below uses a bit sequence 1010 (for TCS) 00 (for DS) and 00 (for RS), see page 7 of the DS1302 datasheet for other options
cheers,
Tobie
==========================
'additional variables
writechrg var byte
tricklereg var byte
writechrg = $91 'Write Command for the trickle register
trickledef = $A0 'definition for a supercap which uses no diodes or resistors
' this goes in the "setup" subroutine, not as the statement first or last though
reg_adr = writechrg
outbyte = tricklereg
gosub w_out
Last edited by [email protected]; - 6th September 2007 at 16:50.
hi,
here's a modified version with trickle charge enabled for a supercap. Note this includes no LCD interface.
A schematic is included in this pdf http://www.parallax.com/dl/appnt/jav2/appnote2.pdf
Here's a datasheet for the supercap, I used the 0.47f component: http://rocky.digikey.com/WebLib/Coop...capacitors.pdf
Bookmarks