i didn't check the whole thing but i confirm that it blink PORTB.5 led, then turn on the LED on PORTA.3, then turn it off.
Your PIC i/o is dead OR there's a bad contact.
And i posted a link before in post #2 about the config fuses.
i didn't check the whole thing but i confirm that it blink PORTB.5 led, then turn on the LED on PORTA.3, then turn it off.
Your PIC i/o is dead OR there's a bad contact.
And i posted a link before in post #2 about the config fuses.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Good ideas.
How can I support you in doing so ?i didn't check the whole thing
Having replaced the PIC I don't think so. I usually press it gently but firmly in the socket. Sometimes I even press when running.Your PIC i/o is dead OR there's a bad contact.
Having read it fully, I will comment that. After my first impression it is just a summary of what fuses are possible. I think I am limited to the ones MPLAB offers ?! Additionally most settings are set to work in most cases so do you suggest focusing on something special for this issue ?And i posted a link before in post #2 about the config fuses.
Yes, you're limited to what's in the .INC file of your PIC.I think I am limited to the ones MPLAB offers ?
Well if the simple TOGGLE PORTA.3 loop don't work, you have to fix it first. Trust me it's working here.How can I support you in doing so ?
Well depending what you call most case.. but me, i use around 50 different PIC model and i have thousands PBP code examples, templates, projects and includes store in my computer. So... how on hearth can i remind what i'd set in all of them and how the hardware is set-up on board... I can't even predict what i'll do next time. This is why i always comment the default config fuses and set ALL of them in my code. One day if i have to modify it, i have only one place to check.Additionally most settings are set to work in most cases so do you suggest focusing on something special for this issue ?
Same rules apply to the other thousand code example on other microcontroller brands and other compiler i also use.
Last edited by mister_e; - 5th February 2007 at 22:56.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I fixed it, now it works. Let's see if the other code works aswell.Well if the simple TOGGLE PORTA.3 loop don't work, you have to fix it first. Trust me it's working here.
Tell me something: How can I be sure that a problem can be found in the externals ? There are so many switches in the chip - the manufacturer calls them features, I name them obstacles.
The other code doesn't work, because the capacitor doesn't discharge.
I am using a WIMA MKS 4 0,01/250-N4 capacitor, I guess that means 10nF.
The resistor is 40K.
That should mean it takes 0,00004 seconds to charge and at a maximum the same to recharge due to - er - well-intended voltage levels.
Then I am recharging it, while counting, but it doesn't stop. When short circuiting the capacitor it works, so the code is OK.
Is this cap no 10nF - cap ?
Is there anything to be changed in the code ?
ADCWert = 0
Trisa.3 = 0
High Porta.3
Pauseus 244
Trisa.3 = 1
High Gruene_LED
WHILE Porta.3 = 1
ADCWert = ADCWert + 1
WEND
Low Gruene_LED
Zaehler = 600 - ( (600 / 1200) * ADCWert) ;to keep time even
Pauseus Zaehler
RETURN
maybe because your Pauseus 244 is way too high? try to remove it.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
This is right. It should be 40.
But.
I found out that the circuitry itself acts as a huge capacitor compared to this one.
I replaced it with 58 pF and threw away my calculations. Now it's time
to experiment....
I am using it ratiometrically but the same value doesn't seem to exist two times.
Somehow the capacitor has to have time to charge, having a too high value for Pauseus doesn't affect the measurement, it makes sure that the cap is surely charged. But here I cannot know when it's surely charged, but this must be more than zero.Code:Wert: ADCWert = 0 Trisa.3 = 0 High Porta.3 ;Pauseus 800 Trisa.3 = 1 WHILE Porta.3 = 1 ADCWert = ADCWert + 1 WEND Trisa.3 = 0 Low Porta.3 ;To make UC = Vss Pauseus 100 ;To make UC = Vss RETURN
************************************************** ***********************
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 " !!!
*****************************************
Bookmarks