![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi again, mrx23 is a bit formal, whats your name mate? I did save the calibration data with the "A" and it held it ok, I had it set at 103% and it was turned on and off many times and retained it ok. When I have adjusted the calibration I have never bothered waiting for the routine to time out, I always just adjusted the value and then immediately turned off and then back on, with no problems. You are right to ask Eirc for help too, without him I would still be stuck with many of my projects, he is very knowledgable and a great help for us people who are struggling, it was Eric who converted the code to the "A" version for me in the first place, something that was beyond me! Anything else that I can help with I will be only too glad to try for you, it would be nice to be able to help for once instead of just being helped, giving something back to this great forum. Also thanks Sarma, I appreciate it. Al
__________________ Founder member of the Campaign to do Something about the nonexistent word "Somethink" | |
| |
| | (permalink) |
| hi mrx, Downloaded your zip. Just to recap, Al is saying that the EEPROM is working OK with the 628A version of the program, saving to EEPROM OK. [I did not change any of the program, I adjusted the CONFIG] Are you saying that with the same program [628A] that Al is using, its not saving to the EEPROM correctly in your project.?? There are minor differences in the EEPROM sequence between the 628 and the 628A, refer microchip AN576. If you would both confirm that the 628A is OK or not, I would be pleased to modify the code. I agree with your PIC pin buffer suggestion. I have not built this meter.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| I was just speculating, now I know that the EEPROM is fine on both A/not A. The problem is with the Timer1 (pin RB6). The pdf says (the A version): Timer1 Oscillator designed for 32,768 Khz operation. Timer1 Oscillator Speed Change: The Timer1 Oscillator is now designed for 32,768 Khz operation. In the 628 the Timer1 Oscillator was designed to run up to 200 Khz. I think that's why it's so slow. Is there any way to solve this? | |
| |
| | (permalink) | |
| Quote:
I have just completed a thorough testing of the 628 and 628A EEPROM write/reads, using both original code and the 'revised code' for the 628A I cannot find any problems, they both work OK. I'll look at the Timer1....
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) | |
| Quote:
In the program, TMR0 is the 'event timer' and TMR1 is the counter for the external clock input [RB6] from IC3d/10 Checked all thru the program, T1CON 'timer1' is always set to the 'external counter' mode Which part of the meter operation 'appears' to be slow.?
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 28th May 2008 at 12:43 PM. | ||
| |
| | (permalink) |
| Hi mrx23, Since you seem to have no name I shall call you Bob! Well Bob, the speed was an illusion caused probably by my excitement at the fact that I no longer had the hangup issue! I have tried both the 628 and 628A again and they seem to perform exactly the same (once past the hangup on the "A") and if Eric says the code will work then I wouldn't question it, to me his word is law If you only have access to an "A" chip then I would not let that stop me building an excellent meter that as I said earlier will work fine if you turn on in the L mode and then switch to C. Hope this helps...........Al
__________________ Founder member of the Campaign to do Something about the nonexistent word "Somethink" | |
| |
| | (permalink) |
| Hi, Ok now I see that there is no time difference between the A and Not A. Eric could you tell what causes the hang-up in C mode at start up? I think it stucks in the TITLE3 loop, but why? If I start building something that must be perfect Thank you! Bob | |
| |
| | (permalink) | |
| Quote:
I'll have a look, as I have said, I have not built this meter, no requirement for it. When you say it hangs up, do you mean that it shows TITLE3 for a long time before you can change the switches.? Let you know.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| Hi, I read in other forums that there is a typical "freezing" problem with A version. This was confirmed by Al: "Me: So you don't have the "CAPICATOR TIME OUT" hanging at startup?" "Al: Yes I have the hangup" I looked at the ASM, I only found this two similar messages: "WAITING TIMING" (TITLEB) and "TIME OUT" (TIMEDOUT) TITLEB is only called from TITLE3 TIMEDOUT is only called from TIMOUT2 I think that MCUs do not freeze (with proper PSU), but they do look like freezed in an endless loop. Thx for helping with the code. | |
| |
| | (permalink) |
| Hi Eric, When Bob says the meter hangs if its the problem I had with the "A" then what happens is that when switched on with the C setting (probes open) then the meter shows "waiting timing" and then after a few seconds it changes to "timed out" and will not measure at all. As I said to Bob, if you turn on the meter in L mode (probes shorted) and let it set up, then change to C mode it will work fine, until Bob mentioned that this may be because of the "A" Pic I just thought no more of it as the workaround wasn't too much of a chore, but I must admit since I changed to the non "A" that I haven't missed the workaround one bit The timeout lockup may be caused by something very subtle and may be difficult to find, but as I told Bob, I would still use my meter if I only had an "A" Pic and would still be very happy with it! Yours..............Al
__________________ Founder member of the Campaign to do Something about the nonexistent word "Somethink" | |
| |
| | (permalink) |
| hi Al, Thanks for the clear description of the problem. I will look later today, I may have to 'knock up' a 'noddy' version of the meter to I can check in real time.! Glossary of terms: Knock up, means construct a rough working model. noddy, as simple and quick as possible....
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| hi mrx, I have made a working circuit of the meter, no PIC connect at this time. Monitored the meter using a scope. Found that with the meter switched to CAP and the test leads open the 'cap osc' does not always start up. So no pulses go to RB6 Tmr1 input, hence the program will Time Out and freeze. This dosn't happen with 'ind cap' the ind osc always starts OK. Looking back thru other forums, this has been an inherent fault for user having the 16F628 version for a long time.! Checking thru the program I cannot see a link between the change to 628A from the 628 that would explain the bug. I will look some more, let you know.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| Great research Eric! Maybe it's not a program bug. If the CAP osc circuit doesn't start up it might be a simple electronic problem. And what's the difference between start in CAP mode and switch to CAP mode (without Cx)? Maybe the CAP osc needs a little time to be stabilized? (a delay in the startup subroutine) | |
| |
| | (permalink) | |
| Quote:
What the unit does is to use the CAP osc frequency, based on the 1n0 and 10K,1K , during initialisation to determine the base frequency due to this 1n0 Cap and the stray cap from the test leads. It stores this 'base' frequency/count and uses it as a NULLING value for future CAP measurements. The problem seems to be, the CAP osc has two modes of osc when the meter is powered ON. In the unstable mode, the freq is so high, that it lacks the drive to switch the input to B6/Tmr1 of the PIC at TTL levels. The PIC just sits there waiting for the initial calibration count, which never comes and so it freezes/locks up. I am going look some more today.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 31st May 2008 at 08:12 AM. | ||
| |
| | (permalink) |
| Hi Al, I have built the LCF meter, on the bench, used the last 16F628A program in a PIC. As I explained earlier the frequency of the CAP osc can be very high at switch ON. This high freq is connected from the 4011 pin10 to the PIC pin 12 via a 10k resistor. The high freq at the PIC pin after its passed thru the 10K is insufficient to switch the Tmr1 input, so the program waits forever.! Reduce the 10K0 [R5] to 4K7 [ put another 10K in parallel if its easier] This fixes the problem 100% on my test set up ... Can you give it a try, leave the test prods open as per the designers instructions. Let me know what you find.. I know that the 10K is there to protect the 4011 output when an external freq is input, but the 4K7 should get the same result.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 31st May 2008 at 03:24 PM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| High ADC sampling rate PIC, 18F needed? | bananasiong | Micro Controllers | 24 | 28th October 2007 01:13 PM |
| Analog Meter | windozeuser | General Electronics Chat | 19 | 3rd October 2007 03:44 PM |
| amp meter needed ? | gigster | General Electronics Chat | 12 | 8th March 2007 10:49 PM |
| Help needed with LED Bar Current Meter! | blue7hand | Electronic Projects Design/Ideas/Reviews | 6 | 28th February 2005 12:40 PM |
| Panel meter, analog VS digital | Johnson777717 | General Electronics Chat | 7 | 23rd June 2004 12:33 AM |