• Willkommen im Geoclub - dem größten deutschsprachigen Geocaching-Forum. Registriere dich kostenlos, um alle Inhalte zu sehen und neue Beiträge zu erstellen.

Reaktivlicht-Wiki

nhedgehog

Geocacher
Jetzt hab ich es kapiert. Herzlichen Dank!
Nur zur Kontrolle und falls noch jemand das sucht, hier die in diesem Zusammenhang verwendbaren Watchdogs:
Code:
Wdtcr = &B11010000 'Watchdog auf 16ms einstellen
Wdtcr = &B11010001 'Watchdog auf 32ms einstellen
Wdtcr = &B11010010 'Watchdog auf 64ms einstellen 
Wdtcr = &B11010011 'Watchdog auf 125ms einstellen 
Wdtcr = &B11010100 'Watchdog auf 250ms einstellen
Wdtcr = &B11010101 'Watchdog auf 500ms einstellen
Wdtcr = &B11010110 ‘1s
Wdtcr = &B11010111 ‘2s
Wdtcr = &B11110000 ‘4s
Wdtcr = &B11110001 ‘8s
 

kopito

Geonewbie
Hallo an alle Forumsteilnehmer.
Ich bin ein Geocacher Spanisch und interessiere mich für die Herstellung von reaktiven Lichter LDR.
Ich habe bereits die ersten von ihnen geplant mit dem Code aus dem Wiki-Link:

http://reaktivlicht.pbworks.com/w/page/3790939/Reaktivlicht% 20Programmcode% 20LDR

Ich habe einen Zweifel: Das Ergebnis ist eine blinkende LED, die etwa 4 Sekunden dauert und es blinkt (10) mit einem kurzen Intervall zwischen ihnen. Fast kontinuierlich.

Was muss ich im Quellcode ändern, um die Zeit zwischen den Blitzen zu erhöhen?

Die Anzahl der Blitze scheinen Recht (10), aber ich möchte die Gesamtlänge von ihnen zu erhöhen.

Ich hoffe, Ihre Hilfe.
Regards,

Rafa
Trushoo bei geocaching.com
http://www.trushoogeo.com
 
OP
S

stonewood

Geowizard
kopito schrieb:
http://reaktivlicht.pbworks.com/w/page/3790939/Reaktivlicht% 20Programmcode% 20LDR

Ich habe einen Zweifel: Das Ergebnis ist eine blinkende LED, die etwa 4 Sekunden dauert und es blinkt (10) mit einem kurzen Intervall zwischen ihnen. Fast kontinuierlich.

Was muss ich im Quellcode ändern, um die Zeit zwischen den Blitzen zu erhöhen?
Hallo Rafa,

perhaps it would be better to rewrite your question to english? I don't understand it.
 

kopito

Geonewbie
stonewood schrieb:
kopito schrieb:
http://reaktivlicht.pbworks.com/w/page/3790939/Reaktivlicht% 20Programmcode% 20LDR

Ich habe einen Zweifel: Das Ergebnis ist eine blinkende LED, die etwa 4 Sekunden dauert und es blinkt (10) mit einem kurzen Intervall zwischen ihnen. Fast kontinuierlich.


Hallo Rafa,

perhaps it would be better to rewrite your question to english? I don't understand it.



Enviado desde mi iPhone con Tapatalk ;)
 

kopito

Geonewbie
stonewood schrieb:
Hallo Rafa,

perhaps it would be better to rewrite your question to english? I don't understand it.
Here is the same message in english:

Hello to all forum participants.
I am a geocacher Spanish and am interested in the production of reactive lights LDR.
I've already completes the first of them with the code from the Wiki link:

http://reaktivlicht.pbworks.com/w/page/3790939/Reaktivlicht% 20Programmcode% 20LDR

I have a doubt: the result is a flashing LED, which flash for about 4 seconds and it flashes (10 times) with a short interval between them, almost continuously.

What do I need to modify the source code to increase the time between flashes?

The number of flashes seem right (10), but I would like to increase the total length of them.

I hope your help.
Regards,

Rafa
Trushoo at geocaching.com
[Url = http://www.trushoogeo.com] http://www.trushoogeo.com [/ url]




Enviado desde mi iPhone con Tapatalk ;)
 

kopito

Geonewbie
Note: it's about flashing velocity and not for the number of times it flash...

Need to modify watchdog (0.125ms) ??

Idont't know what i need to do...


Enviado desde mi iPhone con Tapatalk ;)
 

kopito

Geonewbie
Update:
Today i have modified the base code (reaktiv licht LDR.bas) and have altered the following items:

First:
Code:
Config Portb = &B00001000

From &B00001001 to &B00001000

cause my LDR is attached to VCC.

Second:
Code:
Wdtcr = &B11010100

Watchdog definition. From 0.125ms to 0.250ms. I have now a bit slowly flashing. It´s better.

Third:
Code:
Blinken:                                                  
  For A = 1 To 15

I have modified the number of times the led flash from 10 to 15. A slowly flashing with upgrading the number of flash, better experience at night.

Hope, this help to any other DIYer

Thanks all
 
OP
S

stonewood

Geowizard
kopito schrieb:
Code:
Wdtcr = &B11010100

Watchdog definition. From 0.125ms to 0.250ms. I have now a bit slowly flashing. It´s better.
You should leave the Wdtcr above as it is. But what you can do is:

Code:
Blinken: 'LED blinken lassen
  For A = 1 To 10
    Portb.3 = 1
Wdtcr = &B11010100 'you can use different values here
    Reset Watchdog
    Powerdown
Wdtcr = &B11010011 ' this resets watchdog to the default from above
    Portb.3 = 0
    Reset Watchdog
    Powerdown
  Next A
  Alt = 1023 'Doppelauslösung verhindern
Return
This is extending the 'on' phase, if you do the same with the 'off' phase this will also work. See the post from nhedgehog for different values of the Wdtcr register for extended waiting: http://www.geoclub.de/viewtopic.php?p=881207#p881207

Also you could duplicate the 'reset watchdog - powerdown' sequence since this two commands will actually wait 0.125s. So
Code:
    Reset Watchdog
    Powerdown
    Reset Watchdog
    Powerdown
would wait 2x0.125s, making it 0.25s. With this you could also reach e.g. 0.75s (3x0.25s, 6x0.125s) which with only modifying the watchdog would not be possible.
 

kopito

Geonewbie
Really apreciates comment, stonewood.
I take note of this coding update for next references.

Thanks !


Enviado desde mi iPhone con Tapatalk ;)
 
Oben