Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help to convert to Anode Display for a 50 V DC Panel Meter...

Status
Not open for further replies.
To suppress the leading zero for 01.2 to 09.9 volts, I think you would just need to insert a couple lines. Can you try this?
Code:
fire_MSD
    btfss    INDEX,0    ;âûáîð ÷åòâåðêè ñåãìåíòîâ äëÿ îòîáðàæåíèÿ
    goto    fire_MSD_A
fire_MSD_C
    movf    D1,w
    bz      display_end        ; <------------------------
    call    LEDTABLE_C
    iorwf    PORTC,f
    btfsc    mode    ;ðåæèì èçìåðåíèÿ íàïðÿæåíèÿ?
    goto    display_end    ;íåò, èçìåðåíèå òîêà
    Bank1    ;äà, çàñâå÷èâàåì òî÷êó âî 2-ì ðàçðÿäå
    movlw    TRIS_C_dot_ON
    movwf    TRISC
    Bank0
    bsf    coma
    goto    display_end
fire_MSD_A
    movf    D1,w
    bz      display_end        ; <------------------------
    call    LEDTABLE_A
    movwf    PORTA  
    goto    display_end
 
waw..... Its working good... Thanks Boss

I am trying to contact to EDDY71 for autodetecting display type. Inform you later. thank you Mike.

Regards Manoj
 
I think so. I believe you would replace the 150K resistor with 310K of resistance. You'd also need to change the voltage calculation code. Instead of dividing the ADC result (0..1023) by two and testing for an upper limit of 500 for a display of up to 50.0 volts, you'd leave the ADC result alone and test for an upper limit of 999 to display up to 99.9 volts.

I can try those software changes later today, if you'd like.

Cheerful regards, Mike
 
Hi Manoj:

If you want to test the 99.9 volt modification, try replacing the VOLTAGE code section in your source file with the section of code shown below. Note that this code works for the original 49.9v AVMeter (R2 = 150K) or 99.9v (R2 = 310K) by setting the 'limit' constant to either 500 or 1000 before assembling the code.

Cheerful regards, Mike

Code:
VOLTAGE
        bsf     mode            ; voltage mode (1 decimal place)  |00
;
;  test for voltage based on the 'limit' constant
;
;  use 'limit'  500 for 49.9v upper limit (R2 = 150K)
;  use 'limit' 1000 for 99.9v upper limit (R2 = 310K)
;
        radix   dec
#define limit   1000            ; 500 (49.9v) or 1000 (99.9v)

    if limit == 500             ; if 49.9v range (R2 = 150K)
        clrc                    ; divide ADC result by two        |00
        rrf     DH,F            ;  "                              |00
        rrf     DL,F            ;  "                              |00
    endif
;
;  test for voltage value limit (500 or 1000)
;
calc_voltage
        movlw   high(limit)     ;                                 |00
        subwf   DH,W            ;                                 |00
        movlw   low(limit)      ;                                 |00
        skpnc                   ;                                 |00
        subwf   DL,W            ; DH:DL < limit?                  |00
        skpc                    ; no, skip, else                  |00
        goto    do_BCD          ; convert value to Decimal        |00
        movlw   10              ; display "---" (range error)     |00
        movwf   D1              ; '-'                             |00
        movwf   D2              ; '-'                             |00
        movwf   D3              ; '-'                             |00
        goto    MAIN            ; loop                            |00
;
Please disregard the above code. The only change that had to be made to the code for 100v operation was to add a single line to the source file;
Code:
VOLTAGE
        bsf     mode            ; voltage mode (1 decimal place)  |00
        goto    calc_current    ; 99.9v mod (R2 = 310K)           |00 <-- add
 
Last edited:
Hello Mike,

There is something unusual. Its showing some kind of error.

Can you give me the complete code or 99.9 V CA and CC with zero suppres hex file only?

" 99.9 V CA and CC with zero suppres hex file only?"

Regards Manoj
 
Last edited:
Hello Mike..

I tested your code AVMeter_CA_LZ_99V.asm and its working Great.

So I have

1. 50 Volt Common Anode DC Volt Meter
2. 50 Volt Common Cathod DC Volt Meter
3. 50 Volt Common Anode DC Volt Meter ( Suppresing Zero MSD. like 01.2 to 1.2V)
4. 50 Volt Common Cathod DC Volt Meter ( Suppresing Zero MSD. like 01.2 to 1.2V)
5. 100 Volt Common Anode DC Volt Meter ( Suppresing Zero MSD. like 01.2 to 1.2V) many thanks for your attension in this post and valuable help.

One more request Mike, I like to make this one too, I hope your help.

6. 100 Volt Common Cathod DC Volt Meter ( Suppresing Zero MSD. like 01.2 to 1.2V)

Thanks again for your Valuable Help..
 
Hi all..

You can use this PCB for the above Meter. Its display only the voltage.

Thanks Mike - K8LH for his valuable help.

I share this PCB for who want to make this voltmeter. More details will get on this thread. Thank you



**broken link removed** **broken link removed**




**broken link removed**
 

Attachments

  • ORCAD PCB ver 1.10.PDF
    549 KB · Views: 203
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top