Pic question

Off-topic Or Otherwise...Say/Ask It Here
Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Pic question

Postby Aaron S M » Sat Nov 22, 2008 5:04 am

Hi, I am new here. I will get to the point: I am completley new to microcontrollers. Basically I want to build a digital timer that counts-Down from any time i want . For my first project right now, I am only using four seven-segment-common-cathode-LED's.

As you can guess, two digits is for minutes and two are for seconds.

(eventually i want to make a new project timer that counts hours/minutes/seconds using six digits, after i know i can make four digits countdown).

anyhow, I bought a 4511 ic and the Pic i bought is the PIC16F84A-04.

The programmer I got is the "PIC JDM Programmer" . I got this for two reasons, one (it supported the PIC16F84A) and two (it was all i could afford at the moment).

I have done some research, yet I am a self-learning person. Basicaly working on electronics at home when I can. so finding info can be hard.

why do I like electronics? I admit I have been interested since the show Sliders existed. and, it is the best hobby in the world.

anyhow, I have built a digital timer before, but a much longer and expensive and energy cost way. I built it without any PIC's. i used the 4511 and 4029 and 555 . of course when i found out that each digit required two of those three chips , each, well i knew i had to find another way, and then enters the world of PIC microcontrollers.

ok,anyways,..

so as i said, i am using four digits , and a 4511 chip, (i also have a 555 chip if i need that for the clock cycle ) , and the PIC I am using is the PIC16F84A-04. the programmer is the PIC JDM Programmer.

And as I said I want to program the PIC for my digital timer.

No I have not downloaded anything yet onto my computer,I am uncertain which is best for a new learner like myself.

So I was hoping you might help me out with a few questions PLEASE.

1. What are the Free things I need to download to my computer,(and will a laptop computer work ?)

2. Which ever program (software? i'm not good at the terms used LOL), I download, will it automatically have a Timer program written to download to my PIC? Or do I have to (as I guess) write the program myself?

3. any chance you could write me the program? i think its called a hex file, and perhaps what ever is needed for me to type in? Or if there is some way I may learn to write it myself?

4. a paper came with my assembled programmer, it has a website for software to download , should i download the one it recommends or is there a better easier one for new learners?

5. how do i know which way to install the PIC to the programmer? will the PIC be broken if i install it the wrong way?

basicaly, any help ,..would help.

Thank You soo much.

(and yes, im building a timer prop cause of being a big fan of the show Sliders LOL).

-Aaron

shiny
Newbie Pyro
Posts: 2
Joined: Thu Nov 27, 2008 10:07 pm

Might try myself

Postby shiny » Thu Nov 27, 2008 10:26 pm

Hi,

I'm a beginner myself, but couldn't watch your post sit there alone unanswered, so I'll do my best to answer your questions, although it'll be best to consult someone experienced with electronics.

Anyway:

1. It seems you need a serial or parallel port, depending on your version of the programmer. Laptop will work as long as you have the needed port.

2. Probably you.

3. Not me ;)

4. Worth a try.

5. You should really google for pic programmers and learn a bit more. I also presume your programmer came with some kind of manual?

Cheers!

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Sat Nov 29, 2008 1:04 am

no my programmer did not come with a manual.

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Sat Nov 29, 2008 6:44 am

I'll put my 2cents in as well...


1. What are the Free things I need to download to my computer,(and will a laptop computer work ?)


I recommend downloading the MPLAB development suite from microchip.com. It is free. Also get the C18 compiler library (also free~student version).

I made a tutorial here for how to set it up:

http://www.pyroelectro.com/tutorials/pi ... index.html

2. Which ever program (software? i'm not good at the terms used LOL), I download, will it automatically have a Timer program written to download to my PIC? Or do I have to (as I guess) write the program myself?


You can create and compile the program using MPLAB. Then depending on your programmer (sounds like you have a JDM) you can download the program hex file to the PIC via MPLAB or another programming software (maybe your programmer manufacturer has a recommended software)

3. any chance you could write me the program? i think its called a hex file, and perhaps what ever is needed for me to type in? Or if there is some way I may learn to write it myself?


Learning to program is indeed a task in-of-itself but not an impossible one since you only desire to do something fairly simple. That being said I think you can manage on your own, just ask for help here if you need it.

4. a paper came with my assembled programmer, it has a website for software to download , should i download the one it recommends or is there a better easier one for new learners?


Maybe? I don't know what they recommend. I probably actually know what it is, you just didn't give a name =P. There's only a few different PIC programming softwares that have been given a Microchip 'seal of approval'.

5. how do i know which way to install the PIC to the programmer? will the PIC be broken if i install it the wrong way?


I'd hope that the manual shows you where the 'notch' or right way to put the PIC into the programmer is. There's usually some type of notch in the corner to indicate the first pin or 'top'.

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Sat Nov 29, 2008 1:06 pm

Thank you for the answers. In response to your question, pyroelectro, to my #4 question here is more info:

I had tried to type the web-address here but it didnt let me,(saying somthing about how new people can not post websites) so I will type it here with spaces so that this website will allow it to be shown.

w w w. n b g l i n. c o m / j d m. h t m

the above is the website that was recommended on the paper which came with my programmer.

I will take your suggestion though, and download what you suggested.

There's a picture of the exact assembled programmer that I have , on that website as well.

I'm assuming that the "notch" you spoke of, is the one in the left corner (where there seems to be ....somthing,[if you see the picture on the website you will know what I mean] ).

I also Agree to your reply of my question #3, I feel confident that I can learn how to program . In fact after researching I feel ready to download software and begin to try and write my program . I figured that the task I am trying to do is a simple one , making it easier to accomplish.

I definitly will post here again if I need help with it, I thank you pyroelectro for your response.

I shall also look at the tutorial you made.

may I ask , pyroelectro, why you have chosen to create this website to help us beginer's? I am glad you did, cause it gives us help learning electronics.

-Aaron

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Sat Nov 29, 2008 2:16 pm

Hey Aaron,

The programmer you have is just fine. You'll need to use the software they provide at that website to program PICs with a hex file. Pin 1 of the Ziff sockets is the left side nearest where it reads '3m' take a look here:

Image

The notch (a little dip) on the PIC itself means that is Pin 1.

The board is powered using the serial port.Things might seem a little tricky at first but just keep at it.

I started this site, not really to help beginners (although I think it is fun to help people just starting out) but mostly to document simple projects I'd done. I also use it as an aide for classes that I teach :D . Pictures & Youtube videos help people learn far better than books!

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Sun Nov 30, 2008 3:16 am

Hi Pyroelectro,

Thank You so MUCH. Now I know how to install the PIC properly.
And thank you sooooo much for letting me know which software to download!


I have to say, that I greatly appreciate your replies. I do, have a few more questions , which, when ever you may have time to answer, I am thankfull for.

I do thank you for your time that you give to this website. And your are correct, pictures and youtube do help teach. So does experience.

I am excited to learn how to program this microcontroller, for then it opens the door and mind into further reaches of the hallway of knowledge.

I look foward to building this timer prop, then seeing what other interesting things I may build with electronics.

For me, its not the fact of just owning an electronic item, but also knowing how it works, how to build/ create one, and to invent new things.

O.k., I probably shouldn't make this too long.

so, here are my main questions now :

1. So after I download the software from there website, do I need to download the "C18 compiler library " too? or just the one software from the website that my programmer item suggested?

2. (this may sound like a stupid question , yet as my uncle always said "no questions are stupid questions if it clears the path up") so, am I correct that my PIC16F84A-04 is to be placed in the small "Ziff sockets" at the left? rather then the large one .

3.To create the "hex file." do I:
i) need
to connect the programmer to my computer? or
ii)
do I create it first with the software ,(as I am guessing I do), then , after creating it, plug in the programmer and then follow your tutorial, as to transferring the file , {using the software downloaded} , from the computer , into the PIC?

4. Am I correct in understanding that , to program a PIC (as I have understood so far in my search for info) , the proceedure for one, is to first, create a "hex file" and two transfer that file from the computer to the PIC ?

5. Did you ever watch "Sliders" ? ( I had to ask, for it was my favorite show, and got me interested in electronics in the first place.)

Once again, thank you for your reply.

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Sun Nov 30, 2008 6:17 am

Hey Aaron,

1. So after I download the software from there website, do I need to download the "C18 compiler library " too? or just the one software from the website that my programmer item suggested?


This depends. I recommend using the C18 compiler library because then you can program in C for PICs instead of assembly. However, the C18 compiler is made only for 18xxxx series PICs. Since you want to use a 16xxxx series PIC (16F84A) you'd have to use assembly to create your program and the C18 library wouldn't help you.

2. (this may sound like a stupid question , yet as my uncle always said "no questions are stupid questions if it clears the path up") so, am I correct that my PIC16F84A-04 is to be placed in the small "Ziff sockets" at the left? rather then the large one .


The smaller Ziff sockets with 18 pins is where your 16F84A will go when it is ready to be programmed.

3.To create the "hex file." do I:
i) need
to connect the programmer to my computer? or
ii)
do I create it first with the software ,(as I am guessing I do), then , after creating it, plug in the programmer and then follow your tutorial, as to transferring the file , {using the software downloaded} , from the computer , into the PIC?


To create the hex file, you simply write your program in the MPLAB development suite and then compile it. Wherever you save the project, the .hex file will appear with the same name as the project.

After you have a hex file you want to program your PIC with. You plug a serial cable from your computer to the programmer, Put your PIC in place, Load the Hex file into the programming software provided by the manufacturer, set any configuration bits (maybe? I'd have to look at the programming software) then click program. The information will be transferred serially to the PIC. Depending on your programmer it can take seconds or minutes.

4. Am I correct in understanding that , to program a PIC (as I have understood so far in my search for info) , the proceedure for one, is to first, create a "hex file" and two transfer that file from the computer to the PIC ?


This is correct. This process is called 'Cross-assembly'. When you create programs for a certain computer on a separate computer.

5. Did you ever watch "Sliders" ? ( I had to ask, for it was my favorite show, and got me interested in electronics in the first place.)


I think I saw a few episodes but I would have been a little young when it was popular. If I can remember correctly it was about leaping through separate time-lines using some small device (I would argue that such a device will exist some day :wink: ). Seems like a fun idea to fantasize about but I was probably more interested in the Simpsons at that time =P.

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Mon Dec 01, 2008 2:57 pm

Hi Pyroelectro,
....Help. ...... um, may I ask you another question?

that website I showed you, which has the software for my JDM Programmer, has two softwares , "v3.61" and "v3.57".

1. Do you know , perhaps , which one I should download?

2. I tried downloading each one, but for some reason, I can't figure out how to open it. I looked at your tutorial, and I imagine the software that you download is better then the one that I am trying to download.

No options for installing wizard or anything pop up, when I click to download the software from the site, it gives an option of savng or opening, I choose save, and after it saves it onto the computer it gives a choice of what to use to open it with, and I am uncertain what to open it with , I tried useing word but it was obviously wrong.

i did not have my programmer attached to the computer, perhaps am i supposeto have it hooked up when im downloading software from the website to my laptop computer?

i emailed the programmer company but they are being no help at all. all they did was give me a link to the link on that page that is a short breif guide, but even that guide doesnt help.

do u think that microchip com in your tutorial would be better and work with my progammer?

i really need help to download the software. cause when ever i try to download the programmers software from the site they gave nothing happens.

Any advice , if possible, would be greatly appreciated.


Thank you.

Aaron

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Wed Dec 03, 2008 2:13 am

hi pyroelectro,

i tried plugging in my programmer, but when i was doing that, i realized,.... the other end of the cable, doesnt have the proper end to plug into my laptop computer....

nor does my computer have the proper software to open the kind of file that the software for my JDM Programmer has.

the file of its software is a RAR file, and I dont have the proper program to open it. and any program online costs money.

so, at the moment it looks like i need some sort of adapter, much like the adapter that you show in your tutorial.

i guess its not as easy as it should be, I thought one just had to buy the programmer, and download software and that would be it.

but its not that easy obviously.

so a question is : how does one open an RAR file?

Aaron

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Sun Dec 07, 2008 3:48 pm

Hey Aaron,

the file of its software is a RAR file, and I dont have the proper program to open it. and any program online costs money.


A "rar" file is similar to a zip file. Use a program like Winrar or 7zip to un-Rar the software inside. This is similar to un-Zip'ing files.

http://www.download.com will have both winrar and 7zip for free to download and install.

i guess its not as easy as it should be, I thought one just had to buy the programmer, and download software and that would be it.


It can be that easy, but you have to do alllll your homework before you get a programmer and even then you might run into some surprises and need to figure out some 'work-arounds'

Aaron S M
Newbie Pyro
Posts: 22
Joined: Sat Nov 22, 2008 4:32 am

Postby Aaron S M » Tue Dec 09, 2008 2:20 am

Thank you Pyroelectro !

I won't keep asking questions.

You have been more then kind enough to answer all the one's I have asked.

I used 7zip and it worked with the zip file.

Now the next part, createing a hex file.

I have been researching more on the internet, and have opened the software, and am trying to figure it out, with time and luck, I feel I may.
From what I have learned recently, I may not need anything more then the digits and the pic16f84a to have a multidigit timer. no 4511 needed.

i shall keep looking at this website to see tutorials and to learn. take care and have a merry christmas.

thanks for your help.

-Aaron


Return to “Put'm Here”

Who is online

Users browsing this forum: No registered users and 118 guests