Yes Alain, MCU is 16F877, but this is minor.
Do you mean that with OPTION_REG=$81 does not work also at your test?
I have not the board with me at work now. I will test it late today.
Ioannis
Yes Alain, MCU is 16F877, but this is minor.
Do you mean that with OPTION_REG=$81 does not work also at your test?
I have not the board with me at work now. I will test it late today.
Ioannis
I have an old 877 here...
I'll breaboard it ...
We'll see !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi, Ioannis
YOUR code has passed the Breadboard test ...
Works as expected ... ( little flash when PORTB.0 tied to ground )
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Looking at the PICDEM2+ schematic some more, it seems that there might be a conflict with PORTB.0
<img src=http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1794&stc=1&d=118289364 1>
With J6 installed (has to be for the LED on PORTB.2), the LED on PORTB.0 may not allow the voltage to rise far enough to register a HIGH level.
<br>
DT
I joined in this quite late, but on the original bargraph code posted by Darrel (and also the interrupt code posted elsewhere) I have one thing to say....WOW Darrel. GENIUS.. BOTH of these snippets have saved me hours of work on a project I'm working on.
I needed to poll an array of front panel switches every few milliseconds AND service a bargraph update AND change the frequency of a HPWM signal all at set times, I was in the process of writing an RTOS for the PIC to allow me to use queued commands executed on a priority/time basis, then these two pieces of code went live.
OK, you killed my six months of work on the RTOS, but I'm not complaining. Everytime I see a new posting by you I just KNOW it's gonna be soething that makes my life that little bit easier.
A huge thanks and keep up the excellent work.
That's Great Sean!
Always nice to know it's not going to waste.
Hope it makes you money, or
Impresses the boss, or
Get's you an A+ on the project, or
simply presserves the hair, so it can fall out naturally later.
Best regards,
DT
Ioannis,
Just in case you're still thinking, It can't be that (Post #89) because this works ...If you look at the PORTB.0 diagram. You can see that it uses a TTL input buffer when reading PORTB as digital inputs. So, the High and Low voltage levels are 2.0V and 0.8V.Code:while portb.0=1 wend high led1
With the circuit on the PICDEM2+ you'll get around 2.25V with the switch open (depending on the forward voltage of the LED). So it works fine with the digital Inputs.
<img src=http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1800&stc=1&d=118290623 7>
But the signal for the INT interrupt, goes thru a Schmitt Trigger. And it's levels are .8VDD (4V) High, and .2VDD(1V)Low.
The circuits on PORTB.0 of the PICDEM2+ don't produce enough voltage to trigger the interrupt. (when the LED's are engaged)
HTH
DT
Darrel, your suspicion of PICDEM2+ were confirmed! Damn, so many ours wasted over a stupid LED!
Thanks for the help guys!
Finally I decided to use the hardware direction about the log conversion to bargraph display. Faster, cleaner, wide dynamic, expensive!
Thanks again.
Ioannis
Bookmarks