Go to Post Kudos to you IFI, for your continued support of FIRST and its stated ideals - Racer26 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-11-2005, 15:30
Ballam Ballam is offline
Registered User
no team
 
Join Date: Nov 2005
Location: United Kingdom
Posts: 5
Ballam is an unknown quantity at this point
PIC16F84 -> Problem converting ASM to Hex

Hey Hey
Im not too sure if this is the right forum, but im having a few problems with a PIC16F84 microcontroller.... i have tried several of my own programs (All tested in MPLAB) and nothing happens.... i've also tried a couple of ASM files i have downloaded off the internet and converted myself.... but still, nothing happens.... however i downloaded a pre-converted hex file off the internet and it works fine.... so i've come to the conclusion that its a problem when im converting the file?

Im using default settings in MPASMWIN.exe but i have changed the processor to 16f84. Is there anything missing here?

Thanks in advance
-Ballam
  #2   Spotlight this post!  
Unread 07-11-2005, 16:27
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: PIC16F84 -> Problem converting ASM to Hex

what do you mean by converting the asm file?

the asm file is the source file, it must be compiled (make or build)

and you probabally need to have some include (.inc) files in the same directory

what do you mean "nothing happens" ?

does the assembly run when you click on 'BUILD'?

do you get error messages?

did you set up the project in MPLAB to point to the right directories?

did you ADD your .asm files to the project?
  #3   Spotlight this post!  
Unread 07-11-2005, 17:00
Ballam Ballam is offline
Registered User
no team
 
Join Date: Nov 2005
Location: United Kingdom
Posts: 5
Ballam is an unknown quantity at this point
Re: PIC16F84 -> Problem converting ASM to Hex

Sorry for not being very precise

I mean it builds and succeeds. no errors..... but i burn it to the chip, when i run the chip all the pins all stay low...

i don't have any .inc files
  #4   Spotlight this post!  
Unread 07-11-2005, 17:04
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: PIC16F84 -> Problem converting ASM to Hex

did you use the TRIST registers to make them outputs?

BTW, the TRIST registers are not in the default register bank.

how did you configure the chip to run, internal clock? external RC?
  #5   Spotlight this post!  
Unread 07-11-2005, 18:10
Ballam Ballam is offline
Registered User
no team
 
Join Date: Nov 2005
Location: United Kingdom
Posts: 5
Ballam is an unknown quantity at this point
Re: PIC16F84 -> Problem converting ASM to Hex

external 4mhz crystal

and yes i used the TRIST registers to make them all outputs.... and even if i didn't, i downloaded a couple of sample ASM files to test with

Last edited by Ballam : 07-11-2005 at 18:14.
  #6   Spotlight this post!  
Unread 07-11-2005, 18:15
Ballam Ballam is offline
Registered User
no team
 
Join Date: Nov 2005
Location: United Kingdom
Posts: 5
Ballam is an unknown quantity at this point
Re: PIC16F84 -> Problem converting ASM to Hex

HelloLed.asm is one i downloaded

test.asm is mine




PS: They are .asm but the forum wouldn't allow me to upload asm files
Attached Files
File Type: txt helloLed.txt (998 Bytes, 310 views)
File Type: txt Test.txt (1.3 KB, 240 views)

Last edited by Ballam : 07-11-2005 at 18:19.
  #7   Spotlight this post!  
Unread 07-11-2005, 20:52
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: PIC16F84 -> Problem converting ASM to Hex

neither one of those files has a 'config' statement

the config statement tells the µC whether to use the internal clock, an external crystal, an external clock input, a watchdog timer, the brownout, which pins to put various special functions on, whether to use an external reset....

So your µC doesnt know whats what - try looking for default or example code on the MicroChip website - or read up on the config register for the chip you are using (in the spec sheet for the chip).

If your µC is doing nothing then most likely its looking for a clock input, or a reset signal that isnt there.

BTW- are you a member of a FIRST robotics team, or Vex team, or did you google Microchip and just happen to find this website?

Last edited by KenWittlief : 07-11-2005 at 21:11.
  #8   Spotlight this post!  
Unread 18-11-2005, 13:47
Ballam Ballam is offline
Registered User
no team
 
Join Date: Nov 2005
Location: United Kingdom
Posts: 5
Ballam is an unknown quantity at this point
Re: PIC16F84 -> Problem converting ASM to Hex

aah sorry i didn't reply

yes it was the config bits.



I just found the site on google
  #9   Spotlight this post!  
Unread 18-11-2005, 14:12
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: PIC16F84 -> Problem converting ASM to Hex

Quote:
Originally Posted by Ballam
...I just found the site on google
very cool! FIRST students and mentors are becoming global experts on PIC Microchips :^)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IFI Loader problem - "Invalid HEX file" wun Programming 9 22-09-2004 12:35
FIRST-SME membership archiver 2001 5 24-06-2002 00:41


All times are GMT -5. The time now is 04:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi