Sheeraz Khan
Member level 3
base64 to gif convert
Can anybody convert this file to GIF format
that in blue
This is a multi-part message in MIME format.
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
> alarm, no composite video output, no date, no seconds, just a simple
> semi-accurate clock
I've a new project using a 12F675 as a /50 or /30 divider which
sends one pulse per minute to a 452's INT0. Unfortunately it's
not here so I can't check the board for actual component values
but the principle is basic and works well
It counts mains cycles or the 0.5Hz output of a kitchen clock
module. These can be got from any cheap $1 clock and are very
accurate and stable, much more so than a plain 32k crystal. All
you need is the PCB. Output(s) is from where the coil was attached.
These are reciprocating (ie polarity changes to advance the small
magnet gear drive) and you need the caps to isolate them from 0V
AC, in my case 12VAC, goes to the 12F675 through a resistive
divider and 5V zener. There's also a rectified voltage which the
PIC detects. If that's not there then the PIC knows the unit is on
battery power. AC is preferrable, but the clock module should,
IME, be accurate to a minute or so per year
BTW, you can make a PIC drive what's left of the clock. I've
done a couple of special requests for clocks that needed a dial
but not 1 second incrementation. One was programmable with
thumbwheel switches. Two pins with a complementary output,
limited to 1.6V is all you need
Attached also is preliminary, repeat preliminary, code which does
work but has not been refined. Christmas rush and all that, y'know
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: image/gif;
name="30ppm.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="30ppm.gif"
R0lGODlhRQF7AIAAAAAAAP///ywAAAAARQF7AAAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq2
bgAk8UvX9o3T87Hn/g8MChe7IsDYGyqXzOalaIBCndSqlRqb8q7crteX3SKS37L5LOpJxei2+x1J
HpHwuv2Oz+v3/L7/DxgoqDM3N3iISEiWyNhIsmgn5ziZAlknSZn56KcFo/nZYXnJ5glqiiE6inR0
2jqRChc25korAftGdltLq4vWuwv8CzzMJ0x8fGeMvOymfFZoyLzr/MwqPUxtln19uO3lzS0IfjUe
ziluPj1Ynp7HTt7e+s41H2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X8CcN57456KPTnrpYdZoeupPVKV6
6442CC/frVOu4rWaz067syHGi7vlte9+e+92/w5v8MKTRny/xh9fmb3M8/d89IlJT73z1Nt2/fXW
Z583972/5n344n8O9/jmn4+a7Oivz3777r9PRQEAADs=
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: application/octet-stream;
name="pulsepm.asm"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="pulsepm.asm"
; pulse_60.asm
;
; 22nd Oct 2004
;
; Output 1 pulse/min from 50Hz mains or 0.5Hz clock circuit
list P =3D 12F675
include "P12F675.inc"
errorlevel -305, -302, -306 ;MPLAB error suppression
__CONFIG _CP_OFF & _INTRC_OSC_NOCLKOUT & _BODEN_OFF & _WDT_OFF & =
_PWRTE_ON & _BODEN_OFF & _MCLRE_ON
bank0 macro
bcf status,rp0
bcf status,rp1
bcf status,irp
endm
bank1 macro
bsf status,rp0
bcf status,rp1
bcf status,irp
endm
mov macro litval,file
movlw litval
movwf file
endm
cblock 0x20
ticks
secs
temp1
temp2
t0_cnt
endc
#define led gpio,0 ;1 ppm LED
#define power gpio,1 ;mains on
#define mains50 gpio,2 ;50Hz in, INT
#define b0int gpio,4 ;out to 452
#define clock gpio,5 ;0.5Hz from clock module
org 0x00
goto start
org 0x04
goto isr
org 0x05
start bank1
call 0x3ff
movwf osccal
clrf ansel ;digital inputs
movlw b'00101110'
; 1 0.5Hz in
; 0 output to 452
; 1 /mclr
; 1 50Hz in
; 1 mains on/off
; 0 green LED, output
movwf trisio
movlw b'10000110'
; 1 pullups off
; 110 /128 TMR0 pre-scaler
movwf option_reg ;=3D ~32.768ms rollover 4MHz int RC =
osc
bank0
clrf gpio
movlw b'00000111' ;GPIO 0,1,2 as digital
movwf cmcon
clrf tmr0
clrf intcon
bsf intcon,inte
clrf t1con
mov 0xff,tmr1l ;load TMR1 with -1
mov 0xff,tmr1h
mov .100,ticks ;2 second resolution
mov .30,secs ;1 minute
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
; Main loop, wait for input
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
main btfss power
goto battery
bcf intcon,intf
clrf tmr0
wt_lh btfsc mains50
goto chk_m1
wt_hl btfss mains50
goto chk_m2
bcf led
decfsz ticks
goto main
mov .100,ticks ;reload ticks
bsf led ;LED on 1/50th second
decfsz secs
goto main
mov .30,secs ;reload secs
call pulse
goto main
battery btfss clock
goto sec2 ;process if power off
btfsc power
goto main ;exit if power comes on
goto battery
sec2 bsf led
call ms5 ;LED on for 5ms
btfss clock ;wait for return high
goto $-1
bcf led
decfsz secs
goto battery
mov .30,secs
call pulse
goto battery
pulse bsf b0int ;50us pulse to 452
mov .252,temp1
incfsz temp1
goto $-1
bcf b0int
return
chk_m1 btfss power
goto battery
goto wt_lh
chk_m2 btfss power
goto battery
goto wt_hl
ms5 mov .249,temp1 ;5ms delay
mov 0x84,temp2
inct1 incfsz temp2
goto $-1
incfsz temp1
goto inct1
return
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
; Fault - TMR0 time-out
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
isr nop
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
t_loop bcf intcon,t0if ;approx 500us delay
btfss intcon,t0if
goto $-1
bcf intcon,t0if
return
end
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
------=_NextPart_000_002E_01C4EFF3.03CD63E0--
Can anybody convert this file to GIF format
that in blue
This is a multi-part message in MIME format.
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
> alarm, no composite video output, no date, no seconds, just a simple
> semi-accurate clock
I've a new project using a 12F675 as a /50 or /30 divider which
sends one pulse per minute to a 452's INT0. Unfortunately it's
not here so I can't check the board for actual component values
but the principle is basic and works well
It counts mains cycles or the 0.5Hz output of a kitchen clock
module. These can be got from any cheap $1 clock and are very
accurate and stable, much more so than a plain 32k crystal. All
you need is the PCB. Output(s) is from where the coil was attached.
These are reciprocating (ie polarity changes to advance the small
magnet gear drive) and you need the caps to isolate them from 0V
AC, in my case 12VAC, goes to the 12F675 through a resistive
divider and 5V zener. There's also a rectified voltage which the
PIC detects. If that's not there then the PIC knows the unit is on
battery power. AC is preferrable, but the clock module should,
IME, be accurate to a minute or so per year
BTW, you can make a PIC drive what's left of the clock. I've
done a couple of special requests for clocks that needed a dial
but not 1 second incrementation. One was programmable with
thumbwheel switches. Two pins with a complementary output,
limited to 1.6V is all you need
Attached also is preliminary, repeat preliminary, code which does
work but has not been refined. Christmas rush and all that, y'know
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: image/gif;
name="30ppm.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="30ppm.gif"
R0lGODlhRQF7AIAAAAAAAP///ywAAAAARQF7AAAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq2
bgAk8UvX9o3T87Hn/g8MChe7IsDYGyqXzOalaIBCndSqlRqb8q7crteX3SKS37L5LOpJxei2+x1J
HpHwuv2Oz+v3/L7/DxgoqDM3N3iISEiWyNhIsmgn5ziZAlknSZn56KcFo/nZYXnJ5glqiiE6inR0
2jqRChc25korAftGdltLq4vWuwv8CzzMJ0x8fGeMvOymfFZoyLzr/MwqPUxtln19uO3lzS0IfjUe
ziluPj1Ynp7HTt7e+s41H2p9m4oZ71Bv1Z+xBkK+fRb+NTH4RMGMaDDuRZERJmKpUtFkcUOoBGNB
/oUTLUqc1TCkp4AjNZ4LZLJCro4To6x8OEUWtJYX01gbY0jNipQqOZKEKWNLTIpB0zljyEZfS548
Kawh+VEMKy1UaV5T1oklqaUNkY5o+sphVx5i5UTtVLHdTVtFH7p1eW/m1k0EQUG7i3ct17dBdfI9
AbauE70C22r1CdIqXcGZsG5FKxSkycCMD6IiPNZtWqGFTFCuzOSzDtCfRI8mTcn0aRB5W7t+DTu2
7NmwHale/eF2EN02eLuY5xsMo+AtgJdORPwVEbFzjWtKXuIm9DgvRxr+G+r4H+YFK3qNbrX6IueN
AU3NrhhFLoZZXYaYXgO+zXELX4iPvJy2bO05/sazLlffbxy9ZRFE7wEkVxu6FWidB5ihgl0lA+5F
RBrduaaBfho+CNGGHmJIYFIffgdQhOpJppcl5FG3X0KexbETh/jNiBM+AJqIhYW26PdAa4DBuBNb
Ew7Jz43p5XigQB/29GJhQX61I304DqZjj0s69aOTKvSjy3kcBPjFO7CMKCORVfLDApc7TimkfFqi
1wCZJDKAED5pLmblXEy6iSZrVsqpXJM93gmlixAeSWWSdMr5nY+C9rklnky6yGeFZyrEaJl6+vmm
kHB5qiile34jaYeMRplpXkCGldSqDt51mTBg0lNofqn6g2VVnZGFF6cIyspmaJfWeGsVxui6/ulX
msY5Z5zBCusrpqlWiiidrbYX3bKDYlltog4yOy2uk0K15a4lckutpbmBWyyS3LKErbLNggpkutfB
aSug4r6bGVWqfgnruWFpK0Q9ooS7r4T/JWhoH2qyq6+xhA7bsMO1LhqxxE9SvBFKHPNKJq0bhyrw
dh+D7GEXTJVascUkY7whqSNHW/JJNMOsocyRXlyzyzdDHFsZK/N8qHliOjWbNhO/jGqvxUw7L85O
a5Nzz98iQzC9SJvry6QtXx0r13usOAmwVuOLzcndeM3iv2FPvbXHTA/HNmrgzY1c3W1HPbDYvKi9
jt52A95xefyqlHWU04C4AdSOP95ioINPd94f5fL6bXmymW8+X8CcN57456KPTnrpYdZoeupPVKV6
6442CC/frVOu4rWaz067syHGi7vlte9+e+92/w5v8MKTRny/xh9fmb3M8/d89IlJT73z1Nt2/fXW
Z583972/5n344n8O9/jmn4+a7Oivz3777r9PRQEAADs=
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: application/octet-stream;
name="pulsepm.asm"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="pulsepm.asm"
; pulse_60.asm
;
; 22nd Oct 2004
;
; Output 1 pulse/min from 50Hz mains or 0.5Hz clock circuit
list P =3D 12F675
include "P12F675.inc"
errorlevel -305, -302, -306 ;MPLAB error suppression
__CONFIG _CP_OFF & _INTRC_OSC_NOCLKOUT & _BODEN_OFF & _WDT_OFF & =
_PWRTE_ON & _BODEN_OFF & _MCLRE_ON
bank0 macro
bcf status,rp0
bcf status,rp1
bcf status,irp
endm
bank1 macro
bsf status,rp0
bcf status,rp1
bcf status,irp
endm
mov macro litval,file
movlw litval
movwf file
endm
cblock 0x20
ticks
secs
temp1
temp2
t0_cnt
endc
#define led gpio,0 ;1 ppm LED
#define power gpio,1 ;mains on
#define mains50 gpio,2 ;50Hz in, INT
#define b0int gpio,4 ;out to 452
#define clock gpio,5 ;0.5Hz from clock module
org 0x00
goto start
org 0x04
goto isr
org 0x05
start bank1
call 0x3ff
movwf osccal
clrf ansel ;digital inputs
movlw b'00101110'
; 1 0.5Hz in
; 0 output to 452
; 1 /mclr
; 1 50Hz in
; 1 mains on/off
; 0 green LED, output
movwf trisio
movlw b'10000110'
; 1 pullups off
; 110 /128 TMR0 pre-scaler
movwf option_reg ;=3D ~32.768ms rollover 4MHz int RC =
osc
bank0
clrf gpio
movlw b'00000111' ;GPIO 0,1,2 as digital
movwf cmcon
clrf tmr0
clrf intcon
bsf intcon,inte
clrf t1con
mov 0xff,tmr1l ;load TMR1 with -1
mov 0xff,tmr1h
mov .100,ticks ;2 second resolution
mov .30,secs ;1 minute
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
; Main loop, wait for input
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
main btfss power
goto battery
bcf intcon,intf
clrf tmr0
wt_lh btfsc mains50
goto chk_m1
wt_hl btfss mains50
goto chk_m2
bcf led
decfsz ticks
goto main
mov .100,ticks ;reload ticks
bsf led ;LED on 1/50th second
decfsz secs
goto main
mov .30,secs ;reload secs
call pulse
goto main
battery btfss clock
goto sec2 ;process if power off
btfsc power
goto main ;exit if power comes on
goto battery
sec2 bsf led
call ms5 ;LED on for 5ms
btfss clock ;wait for return high
goto $-1
bcf led
decfsz secs
goto battery
mov .30,secs
call pulse
goto battery
pulse bsf b0int ;50us pulse to 452
mov .252,temp1
incfsz temp1
goto $-1
bcf b0int
return
chk_m1 btfss power
goto battery
goto wt_lh
chk_m2 btfss power
goto battery
goto wt_hl
ms5 mov .249,temp1 ;5ms delay
mov 0x84,temp2
inct1 incfsz temp2
goto $-1
incfsz temp1
goto inct1
return
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
; Fault - TMR0 time-out
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
isr nop
;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
t_loop bcf intcon,t0if ;approx 500us delay
btfss intcon,t0if
goto $-1
bcf intcon,t0if
return
end
------=_NextPart_000_002E_01C4EFF3.03CD63E0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
------=_NextPart_000_002E_01C4EFF3.03CD63E0--