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.

Newbie to programming need help

Status
Not open for further replies.
I have used pic chips in my projects before ,where the hex file has already been provided.I have a project which now has me stumped ! Due in part to the pic in question not being supported anymore.It is a pic 16c84.The source file is in asm format ,along with an inc file which I am assuming ,should be used as a header file.The project in question and it's source files ,can be seen if you do a google search ,for a dds signal generator with an ad9850 qsl.net.I have tried compiling the files, in mplab and mikro pro for pic but get build fail error 113 ,file not defined as if the header file is missing .It is frustrating ,as the chip is the only thing left to program and the project is finished.I am doing something wrong I know and would appreciate any help out there .Many thanks.
 
You just need to edit the asm file.... The header file has a path!! If you are making a new project just ditch the path.

change this:-
include <c:\mplab\p16f84.inc>

To this:-
include "p16f84.inc"

And make sure the H file is in the same directory!!

Also this file has been modified to run on a pic16F84...
 
Thank you for your reply.If this code has been modified to operate on a pic p16f84 then why the reference to p16c84 in the inc file within the asm file ? I am assuming if these changes are made it will compile with no errors .Also the compiler used must have the p16f84 inc file used within the header file and the asm file.
 
The dss36.asm code builds ok with the 16F84 specifed, though you might want to make it the 16F84A chip which also builds ok,.
The 84 is not that common, though Farnells do stock it, plus you need to check which of those 2 chips your programmer can handle , as I believe there is some differences between the two, progamming wise.

LIST P=16F84A, F=INHX8M
#include <p16F84A.inc>

Just in case you Pic project does not work as expect, I build mine base on this cheap Ardunio ( clone).
https://www.ad7c.com/projects/ad9850-dds-vfo/
 
Success !!!! I am so happy.Just a few minor modifications and the build was successfull,with no build errors. Only need to change pic chip now to p16f84 instead of p 16c84.Big thanks to everyone who replied to my initial thread.You have all contributed to my success and hopefully helped others at the same time.I have learnt a lot and this has restored my faith in human nature.
 
The 16C84 is an OTP part (One Time Programmable) whereas the F device is able to be reprogrammed.

EDIT:
I was mistaken with this statement, please see Nigel Goodwin's reply below.
 
Last edited:
The 16C84 is an OTP part (One Time Programmable) whereas the F device is able to be reprogrammed.
Which thing in the chip stops re-programming after its maximum re-write limit? Like Atmel chips can be re-write 10,000 times. After that, any chemical damage there in the chip so it won't write anymore?
 
Which thing in the chip stops re-programming after its maximum re-write limit? Like Atmel chips can be re-write 10,000 times. After that, any chemical damage there in the chip so it won't write anymore?

As you can see from this link, its basically a 'fuse' thats blown on each cell.
For most practical hobby purposes the OTP chips are obselete in favour of the reprogrammable F types.
https://en.wikipedia.org/wiki/Programmable_read-only_memory

By The Way, did you get the parts / info sent to you, as mentioned in your AVR post last month ?
 
As you can see from this link, its basically a 'fuse' thats blown on each cell.
For most practical hobby purposes the OTP chips are obselete in favour of the reprogrammable F types.
https://en.wikipedia.org/wiki/Programmable_read-only_memory

By The Way, did you get the parts / info sent to you, as mentioned in your AVR post last month ?
Hi WP100,
I almost had forgot about last thread in the ETO (I saw now the thread and got you there), but you still remembered me! :)

Now I knew that why they say 'burn' sometime for the term write . Maybe it means burning fuses on cell. Each one writing is burning some fuses once, and there are many many fuses in backup in PROM to write again and again. At last when there's no fuses remain, the chip won't be able to write code any more.

About the AVR stuff I am going to get, he had said almost two years ago "learn some Assembly/or C, I will send you AVR stuff for you". Till now I am trying to learn something about programming. Started Qbasic for beginning. But it has no use in AVR programming maybe. Qbasic is maybe easy than AVR assembly or C because I do not need to learn about architecture, registry, bit etc. These aspects of the microcontroller are pretty confusing while learning programming. :) So till now I have not said "Send me the stuff, I am little ready." Maybe he will feel uncomfortable to send his valuable stuff to me until I do not learn some programming, so.
 
The 16C84 is an OTP part (One Time Programmable) whereas the F device is able to be reprogrammed.

No it's not, the 16C84 was the first PIC to be electronically erasable (and was the device that triggered massive hobbyist use), using EEPROM technology - as was it's replacement the 16F84, and in turn IT'S replacement the 16F628.

Proper FLASH devices didn't appear until considerably later, and all the early Atmel ones that claimed to be 'FLASH' were actually EEPROM in reality - MicroChip followed suit, and started calling their EEPROM devices FLASH as well (as did other manufacturers).
 
... because I do not need to learn about architecture, registry, bit etc. These aspects of the microcontroller are pretty confusing while learning programming.

All the older people learned that way - first architecture, registers, then assembler, C. Now they say you don't have to learn the low level stuff - only high level language, and this helps you to be more productive. I still cannot figure out if that's true or not, although it doesn't sound right to me :)
 
All the older people learned that way - first architecture, registers, then assembler, C. Now they say you don't have to learn the low level stuff - only high level language, and this helps you to be more productive. I still cannot figure out if that's true or not, although it doesn't sound right to me :)

Do you think 'learning C after the QBasic' is easy than 'learning assembly after Qbasic'?

If I learned C for microcontroller, do not I need to learn registry or define registry etc?

In programming, hundreds of semicolins, slashes, commas, spaces, middle brackets (like- {} ) and broken English irritates me!
 
I felt like I'm hijacking the thread with this post, so I deleted it.
 
Last edited:
Most C programmers know assembler!!! Like me, the majority started micro programming in assembler! I learned assembler on the 8080 and the Z80 ( C was a unix thing... back then ).... I was given a copy of Borland C++ 3.1 and my programming went skywards...... After learning C and C++ I found other languages Pascal, forth yada yada easier to pickup!!!

When I first bought a picstart plus and a little pic16c71jw.... I already owned a UV eraser so I could program oodles of times..

C with these tiny little things was pointless.... C is a good compiler because you can program as low or as high level as you want!..
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top