and the ACDetect routine will need to be changed... burst mode as it is right now... not sure why this version is still hanging around... might have forgot to upload the right version again lol
Type: Posts; User: mister_e; Keyword(s):
and the ACDetect routine will need to be changed... burst mode as it is right now... not sure why this version is still hanging around... might have forgot to upload the right version again lol
Some reed relay have built-in diode, some don't... but still you need one. I wouldn't use them in automotive application.
Out of curiosity... Why do you want a relay for so such small current?!?
Basically you'll build a kind of drum pad. So an electret microphone or piezo sensor should do the trick... Electret microphone are darn cheap... can be found almost everywhere.
your pull-up are far to be correct... at slow speed they need to be 4.7K or so... around 1.8k at higher speed.
Begin with it.
Problem often lie in how you interface the LDR to the PIC. But a software crash... well something's wrong somewhere else. Code, hardware... hard to pin point without having the whole thing here...
How about trying it and see what happen. Those are guideline, really more than enough to begin.
Serial signal sniffer comes handy in those situations.
Food for thought:
Raise the PWM frequency so you can use a smaller cap value... a buffer in between also reduce the load... smaller cap
Some PIC have DAC... 5 bits but workable
R2R network +...
WHILE DoorOpen : WEND
'
' or
Repeat : Until !DoorOpen
'
' or
SitAndSpin: If DoorOpen then SitAndSpin
'
' or ...
Many different way to skin a cat, but sometime, Hserin timeout feature can be handy.
HSERIN 500, main,[WAIT("ACK\r"), SKIP 1, tc_mx, tc_my,SKIP 4, p0, c0, SKIP 2]
OR something like this will...
Tip: To prevent killing the OSC with your probe, you want to use a 10x (or more) probe, and monitor the OSC2/CLKO pin.
it will also return the state of the output. Nothing hard to solve through a bitwise operation or simply by breading the bits you need.
Have you tried with real hardware or your life depends on How proteus decide to work (assuming it works at all)
From your schematic you're using led instead of diode and i'm pretty confident...
Check the default interrupt edge....that's not what you need ;)
INTCON2
Your PIC have a built-in USART... use it, it has load of of advantage.
you haven't posted other lines of code, so it could be anything... often really simple like adding
CMCON = 7
at the...
http://www.picbasic.co.uk/forum/showthread.php?t=800&p=3276#post3276
At least Mono & QT are cross plateform but far far away of Delphi. There's already some cross plateform IDE base like Netbeans (your beloved MPLAB X :eek: ), Eclipse to name only but those. ...
You could still read the I/O in a Timer based ISR... done fast enough it "give" the feeling of an interrupt. You can even use the Time base as debounce delay... you could even trick the PIC and...
So cool to see you back here Dwayne :)
As long as I wake up, it's a good day ;)
check this out ;)
http://support.melabs.com/content/29-PicBasic-Pro-Version-History?
How do you dump the .hex file into your PIC, i mean how do you program your PIC?
Are you sure your device programmer software program the configuration fuses properly?
Those .HEX files providen...
What? It have LATA register, it compile and it works.... maybe you need to upgrade, or double check the chip you compile for?
;)
anyway, since the problem is solved...
I'm always surprised how cheap these things are now....1/2 to 1/4 the price :eek:
You usually want to cut the power instead of ground...
it doesn't always work but give this a try
COUNTER VAR BYTE
FOR COUNTER = 0 TO 5
PORTC.0[COUNTER] = 0 'SET THE PORTC PIN LOW
NEXT COUNTER
something around this
WHILE !_PB and (TimeOut<MaxTimeout)
PAUSE 100
Timeout=Timeout +100
WEND
IF...