Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

source code compiled with mplab

Status
Not open for further replies.

Medtronic

Full Member level 5
Full Member level 5
Joined
May 19, 2005
Messages
246
Helped
29
Reputation
58
Reaction score
16
Trophy points
1,318
Location
Egypt
medtronic2050.blogspot.com
Activity points
2,716
Dear all my friends
i look for a digital bench power supply
and i found a nice one here http://mondo-technology.com/Bench.html
can any one help me for make the source code compiled with mplab ....
the source code is download from the site


Thanks

MedTronic

benchsupply.gif
 
Last edited by a moderator:

Re: digital bench power supply

That's quite a nice design but it is missing some capacitors. It should have one from each end of the crystal to VSS, I suggest 22pF and at least two across VSS and VDD, I suggest 10uF and 100nF.

The code should convert easily to MPLAB, just add "#define" in front of the name aliases and add "cblock" and "endc" around the list of variable definitions. I haven't tried it but I think that should be enough to make it work.
Alternatively, what the page calls the object file is actually a hex file which you can use directly in a PIC programmer.

Brian.
 

Re: digital bench power supply

thanks my friend for your replay

i modulate the code .... good news
but what can i do with this subroutine



Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; decimal values up to 1000 converted directly into
; segment values
 
dexi    movwf   FSR             ;place to put data
        bcf     NZ
        movlw   100<
        movwf   thi
        movlw   100>
        movwf   tlow
        call    :digit
        movlw   10<
        movwf   thi
        movlw   10>
        movwf   tlow
        call    :digit
        movlw   1<
        movwf   thi
        movlw   1>
        movwf   tlow
        call    :digit
        ret


i am stuck her
please help me

thank very much
 
Last edited by a moderator:

Re: digital bench power supply

It's a routine to split the value into three digits 000 to 999 but the actual conversion to segment patterns is done in the routine called 'digit'.

I'm not sure what assembler it was written for but MPLAB doesn't like the '<' and '>' symbols and I'm not sure what they are for. Try changing the section of code to this:
Code:
dexi	movwf	FSR		;place to put data
	bcf	NZ
	movlw	0
	movwf	thi
	movlw	.100
	movwf	tlow
	call	:digit
	movlw	0
	movwf	thi
	movlw	.10
	movwf	tlow
	call	:digit
	movlw	0
	movwf	thi
	movlw	.1
	movwf	tlow
	call	:digit
	ret
I discovered the values by dissassembling the hex listing.

Brian.
 

Re: digital bench power supply

i am sure there is too many professional here

can any one help please

best regards


Hi,

Have you been able to get that code to build properly ??

I could not despite making a lot of amendments to try and get the code to work.

It seems to be some early form of Assembly and as Bryan notes, not compatible with todays MPLAB.

Even if it could be made to work I would replace all the 7 segment displays and driver transistors and chips with a simple 16x2 lcd.

Might be simpler just to use the hex code as is, or find another similar working project.
 

Re: digital bench power supply

Hi,

Good find, though seems its been made obsolete in 2012.

Still Medtronic should be able to compile and modify the code should he need to.
 

Re: digital bench power supply

Almost finished converting it to MPLAB but I have no way of testing it. I have no 16F870s in stock. I'll post a version that assembles without warnings shortly, most of it is done but here are some duplicated labels to sort out. It's certainly a strange syntax!

Brian.

- - - Updated - - -

An untested MPLAB version is attached.

It assembles without errors or warnings but I cannot verify if it will function. Aside from the tool comments spotted by Abidr, there are other issues, duplicated labels, reserved words and mixed radix are used. It should serve as a starter for debugging if necessary.

Incidentally, the page linked in post #7 has some errors and does not fully or accurately explain some of the differences. It also strangely ignores the MPLAB 'dt' directive.

Brian.
 

Attachments

  • bench.zip
    3.2 KB · Views: 139

Re: digital bench power supply

Just download file called Object (POWER.OBJ) and rename to POWER.HEX or only open it and bunr into pic!!!
h**p://mondo-technology.com/POWER.OBJ
 

Re: digital bench power supply

TechTools Software Download

TDE, CVASM Platforms:
WIN '9X /NT /2K /XP (32 bit) /Vista (32 bit) /Win7(32bit)

QuickWriter Platforms (32bit & 64bit):
WIN '9X /NT /2K /XP /Vista /Win7


https://www.tech-tools.com/files/tde52_qw281.exe


Here is working .hex and disassembled .asm file attached, tested in picsimulator.
 

Attachments

  • POWER.rar
    3 KB · Views: 133

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top