Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 21st December 2007, 05:39 PM   (permalink)
Default Help needed EPE ASM to HEX with MPLAB

Hi Guys

Me again with the same problem on a different project.

I have built the hardware for, the PIC-Gen EPE July 2000, about 4 months ago and would like to finish it off. But I have the same problem that MPlab is not compiling the EPE asm code. Once again can any one help please?

Is their a compiler that can compile the code to hex, available from some where on the web, or maybe laying in a computer some where.

Tanks for your help.

Virus

@Brevor

MOOD CHANGES ?, you have no idea how this thing can swing your mind !
Attached Files
File Type: asm PIC-Gen.asm (22.4 KB, 11 views)
Virus is offline  
Old 21st December 2007, 05:43 PM   (permalink)
Default

It's not MPASM compatible code, it's written using a Shareware assembler. If you download Toolkit3 from EPE, it includes routines for converting between formats.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st December 2007, 05:58 PM   (permalink)
Default

Hi Nigel

I have looked on the epe site but could not find the link to any one of their toolkits. Will look again !

What is the .obj file ?

Thax Virus
Virus is offline  
Old 21st December 2007, 06:34 PM   (permalink)
Default

Look under 'Downloads' then 'All PIC Microcontroller source codes', there's 'PIC Toolkit TK2' and 'Toolkit TK3 updates', you can also download TASM the assembler they used.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st December 2007, 07:40 PM   (permalink)
Default

Nigel

Thanx, I got it, can I bug you later on, if I don’t get it working ?

(Taking a shot in the dark here) Do you know where they stored their supplementing articles, I can’t find the library link they refer to. There is one on How to get TK3 running under WinXp.

Thanx

Virus
Virus is offline  
Old 21st December 2007, 09:39 PM   (permalink)
Default

Nigel

Thanx, got TK3 running, just need to figure it out, so this can do the TASM to hex?

Thanx

Virus
Virus is offline  
Old 21st December 2007, 10:35 PM   (permalink)
Default

Quote:
Originally Posted by Virus
Nigel

Thanx, got TK3 running, just need to figure it out, so this can do the TASM to hex?
I think so, and the Toolkit can also convert the source code between the different formats.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st December 2007, 11:49 PM   (permalink)
Default

Nigel

I programmed the chip and verified the data again.. But it is as dead as a doornail when plugged into the PCB. There is 5V+ and 5V- as required.

I is a Pic16F877 it is run with a 3.2768 Mz crystal, is it XT mode ?

Can the programmer verify the data correctly in a PIC if the pic is faulty?

How can I check if the chip is starting up ?

Sorry for all the Q&A.

Virus
Virus is offline  
Old 22nd December 2007, 02:20 AM   (permalink)
Default

There are a few reasons why the file might not work. Orging the code at location 4, assuming decimal radix, not having a config value etc.

Here is a cleaned up version that will compile in MPLAB.

Mike.
Attached Files
File Type: asm PIC-Gen.asm (32.9 KB, 6 views)

Last edited by Pommie; 6th July 2008 at 05:13 PM.
Pommie is online now  
Old 22nd December 2007, 10:02 AM   (permalink)
Default

Mike Morning

I have 0 programming experience.

I did use TK3, and converted the code to MPSAM, used MPLAB complied the code with 0 errors, programmed the chip, and it is not working.

Attached code as converted by TK3 for MPasm.

The DIY128 programmer that I use does not give me all the switches (fuses) options that the TK3, and the project suggest that need to be set.

Can the switches be set in software ?

I believe the chip does not startup, in the construction check out they state that if the LCD is connected with only the power regulator IC’s that the LCD will only have 1 line displaying. The LCD only displays 1 line as in the checkout, with the PIC F877 plugged in it still stays the same, also none of the controls interfacing with the F877 is working, because measuring the output socket I can read the same value as the MAX038 is generating on PIN19.

Can the F877 be dead ?, how do I test it, but it then would not program right ?

Any suggestions where to start, I have checked and dubbel checked the hardware.

Thanks

Virus
Attached Files
File Type: asm PIC-GEN_M.ASM (36.6 KB, 5 views)
Virus is offline  
Old 22nd December 2007, 10:07 AM   (permalink)
Default

Mike

Thanks, haven seen the attachment. Will do necessary, and get back.

Thanx

Virus
Virus is offline  
Old 22nd December 2007, 10:19 AM   (permalink)
Default

Mike

The code does not complie to HEX and either in TK3 or in MPLAB.

It is a PIC16F877 not A, would that make a difference

Virus
Virus is offline  
Old 22nd December 2007, 10:47 AM   (permalink)
Default

You need to change these three lines and then it should compile,
Code:
	list		p=16f877	; list directive to define processor
	#include	<p16f877.inc>	; processor specific variable definitions
	
	__CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _XT_OSC & _WRT_ENABLE_ON & _LVP_OFF & _DEBUG_OFF & _CPD_OFF
And, of course, select the 16F877 on the configure menu.

Mike.
Pommie is online now  
Old 22nd December 2007, 11:54 AM   (permalink)
Default

Mike / Nigel

A cold one on you guys, or maybe just for Mike and myself, Nigel must be freezing up their.

Thanx it seems to be working fine, The F877 is controlling the Max038 etc. Still 0 on the LCD, but I think it is wiring and will sort it out and get back with a photo or two.

I need more info though. The PICGEN is giving me a square, tri and sine wave with + and – values as seen on the scope. How can this be changed to just positive offset, software?, or need it be done with a 555 or something similar that can handel 0.1 Hz to ± 4Mtz. From their I want drive a couple of mosfets (have plenty of IRF540) to drive a air coil at 24volt ± 5-10 amps.

Any suggestions or should I post it some where els.

Thanx

Virus

Last edited by Virus; 22nd December 2007 at 12:11 PM.
Virus is offline  
Old 22nd December 2007, 12:25 PM   (permalink)
Default

Good to hear it's finally working.

Have you a link to the circuit diagram?

Mike.
Pommie is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
PIC16F84A - ASM to HEX Mihindu_gajaba Micro Controllers 3 22nd November 2007 05:30 PM
Question about Inchworm+ Quan Micro Controllers 54 28th October 2007 01:21 AM
PIC16F877A TX data to PC via serial cable derrick826 Micro Controllers 21 8th October 2007 02:28 PM
Need help badly on Inchworm and MPLAB thushy Micro Controllers 14 11th March 2007 07:05 PM
16F88 and MPLAB Help needed GRC Micro Controllers 28 28th December 2006 01:24 AM



All times are GMT. The time now is 01:29 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker