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.

programming 12c508a

Status
Not open for further replies.

kamelat

New Member
Hi everyone,
I have 12c508a pic and I'm using proteus to simulate before writing in the pic.
But the problem is that I found tutorials written in ass
the first file worked verry well, but it's a HEX file so I can't change it.
But the second file is open one, but I don't know how to compile it, I've tried mplab, but it didn't work.
Help me please
 

Attachments

  • 15sec.zip
    18.4 KB · Views: 232
  • SimpleTimer.zip
    11 KB · Views: 233
Welcome to ETO.

SimpleTimer.zip compiles fine for me using MPLab8.92. It should also program, but I did not try to do that.

I did not take the time to simulate or test it.

What errors do you get when you try to program? The 12C508a is a one-time programmable chip. Are you sure that is what you have? Once you write that program to it, there will be no opportunity for changes. Can you get a 12F5xx chip?

John
 
Yes, don't use the antique 12C508 (not even from this millennium :D) - there are many MUCH more modern 8 pin PIC's, which are reprogrammable and considerably cheaper.
 
Thank you for your reply
I have
MPLAB X IDE v4.01
and I opened a project with pic12c508a
but when I compile, it won't work


The problem I have to use 12c508 a
 
It just occurred to me to check this:

upload_2017-10-14_7-54-41.png


As a Yogi Berra used to say, it was like deja vu all over again. The last time I tried to program a non-flash chip I had to buy a PicStart Plus to do it.
 
Here's the hex file I got (release version) for the SimpleTimer.asm that you posted.

John
 

Attachments

  • SimpleTimer.hex
    269 bytes · Views: 212
I used MPLab 8.92 . You are apparently using MPLabX 4.0x I do not use that version, but I am pretty sure it generates a hex code too, once you get your code to compile.

First get your code to assemble (compile) in either Release or Debug. Then, assemble (compile) it in release mode. Then, look in the files. You will find several including a .hex file.

The example you put in Post#4 is not he same code I assembled for you.

John
 
jpanhalt
=============
Hello again
I have downloded the 8.92v but the code didn't compile for me
I guess the problem is in the code itself
So would you give a simple code for pic12c508a that I can use pins as outputs
 
The problem is not in the code you posted. It compiled fine for me with absolutely no changes. I already gave you the hex file for the code you posted that does what you ask (See: post #7).

I don't think sending you another code for doing the same thing will accomplish anything.

Have you set up a project for the code? Can you zip it an post the entire project file? Please post the code you want to use, if it is different.
 
On second thought. Here is the zipped project file for Simple Timer (the code you posted). Unzip it, and click on the file SimpleTimer.mcp . MPLab 8.92 doesn't even have to be running and it should open. If it doesn't start MPLab 8.92 and go through the open project dialog.

John
 

Attachments

  • ETO 10_14_17.zip
    11.4 KB · Views: 204
jpanhalt
=============
Thank you so much
final request please:
could you write to me how to put gpio high and stay that way
because I used to programm with c not ass
Thank you
 
Your program would need some modification to do that, because it uses TRIS to set direction to input, which turns off the outputs. I can modify that, but which pin do you want to be constantly high? So as to avoid confusion, either give the pin number or the GPIO number, but be sure to say which numbering system you use.

What programmer are you using? Depending on what you have, that may be a wasted effort.
 
I'm not sure but I think I am there is no 12c508a in mplab-x 3.65 that I could find I had to add for the 12f508 chip because it was missing names.
That was for asm files I was playing with I just looked at 4.01 the files are there with right names for these chips.
I had problem with tris bits' but 4.01 should work fine.
 
On these chips your better to write a port all at once or you'll be doing something you don't want to happen.
 
You have not answered either question I put to you.

Making one light steady on does not simulate any traffic light I have seen in the past 70 years. Please try to answer my questions
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top