# pic compiling/programming questions

Status
Not open for further replies.

##### New Member
Hello everyone, i got recently into programming and i want to make my first program a decimal to hexadecimal converter (i have the source code on paper), i know how to program with the help of this very useful tutorial that any starting guy should read:

PIC Tutorial

BUT, i dont know how to get it in the pic. I have mplab, ic-prog, winpic800
i know that ic-prog will send the hex file into the pic with the propic2 programmer(correct me if this one is not good) but dont know the rest, so here are my questions:

1.
I want to use a 16c84 but i dont know if it exists, it is not on pic website, there only is 16f84a is it the same thing or close?

2.
How do i get the hex file? I dont know how to get something out of mplab.

3.
How do i send the file into picprog??

And i want to program in assembler, i think its more "funny" then basic.

Could you tell by the way the way that you did it? I would really appreciate it.

#### blueroomelectronics

##### Well-Known Member
Don't use the ancient 16F84 use a 16F628a it's cheaper and better.

Those simple programmers are often more trouble than they're worth

MPASM part of MPLAB can create hex files

##### New Member
Those simple programmers are often more trouble than they're worth
You mean that propic2 is not good? what do you suggest ( if it is diy ).

#### be80be

##### Well-Known Member
Build a pickit2 clone get the kit from Bills site and you still be (Diy) and in the end you'll
have a great programmer. I love it it works on most any pic chip. Only thing it can't do is program
my old lady wish it could I be in good to go then LOL

Last edited:

##### New Member
So geting an hex file with mplab, sending it into ic-prog and then in propic2 wont work?
And i dont want to make ship anything.(exept the pics)

#### Nigel Goodwin

##### Super Moderator
Yes, of course you can assemble the code to a hex file in MPLAB/MPASM, then load it in to IC-PROG, then program it in the chip via propic2.

It's just a longer process.

#### be80be

##### Well-Known Member
I tell you I never used a propic2 but a lot of people have and it worked for them and it will work for you to. Build it use it. It aint no biggie to build in mplab and send it to your programmer software

##### New Member
The pic programmers and software made by motorola are like hundreds' of dollars, but they come with one free 16f84!

#### be80be

##### Well-Known Member
That's what I would do I'd buy Bill's Junebug It's a great programmer and you have the tutor with a 18f1320 which is like a 16f84A on steroids. And there a lot of software to build with for it. Swordfish C18 and yes you can use good old assembly. Use Nigels Tutorials they show you every thing you need to no and yes He using a 16f628 you said a Hint the Hint is you can use a 16f84 for the 16f628 with a little work not much. To use different chips you just change the code to use the right pins and the configure is mostly all you have to do.

Last edited:

#### Nigel Goodwin

##### Super Moderator
The pic programmers and software made by motorola are like hundreds' of dollars, but they come with one free 16f84!
The DIY would cost 20 \$ without the pic's... so i take the 2nd choice.
As others have said, Motorola don't make PIC's, programmers from MicroChip (who do) aren't 100's of dollars, nor do they come with the long obselete 16F84A.

Can anyone give me a clue on decoding/sending an ir signal from an tsop48/ir led in a program (16f84a), i dont ask you to give me the source code, just a hint.Please.
Check my tutorials, which use the 16F628, the PIC that replaced the 16F84A last century.

##### New Member
Woops, mistaken motorola and microchip. So the 16f84a is obselete? it is still on pic website tough.

EDIT:
i just looked at the datasheets and the 16f628a looks much better then the 16f84a, it has +, - and 14 bidirectionnal ports.

Last edited:

#### Nigel Goodwin

##### Super Moderator
Woops, mistaken motorola and microchip. So the 16f84a is obselete? it is still on pic website tough.
It was discontinued last century, replaced by the 16F628, and a migration document was on the MicroChip website - for a good while before that it was listed as "not advised for new projects". Unfortunately lots of idiots seemed to want to keep ordering it, so after a couple of years MicroChip re-introduced it at an even higher price.

Good business, sell an obselete low spec component for lots more money than it's cheaper higher spec replacement - they must be laughing all the way to the bank

#### be80be

##### Well-Known Member
You can do Nigels Tutorials. If you want to learn start with his site and a 16f628a or get
bills junebug with a 18f1320 you can port Nigels code to it and you'll learn a lot. to read
a tsop48 It is high going low when triggered. So you would want to set a pin to input
And test to see if it gos low if so save that to something like IR_in reset flag and check to see if it gos low agin.

#### MrDEB

##### Well-Known Member
I vote for little Junie

I have at the present time 2 Junebugs (giving one to a boy scout as birthday/going away to college present
As for programming the Swordfish is a good program as I myself am a beginner.
Be80be, Blueroom and Pommie have helped tremendously in coding my first project
The CRITTER RIDDER deer chaser
wish I had gotten into PIC years ago.

##### New Member
What is a junebug?

And i would need some help to understand the tsop ( i will use tsop 58438 because it his high imunity to noise(is it good?) )

If the carrier khz is 38 and the pic hz is 1, how can i decode it? i mean the tsop is way too fast.

#### 3v0

##### Coop Build Coordinator
Forum Supporter
I have at the present time 2 Junebugs (giving one to a boy scout as birthday/going away to college present
I suggest you give it to him as a graduation gift. That way you will have some time to help him get started.

##### New Member
Can someone tell me what is the carrier frequency? is it the high-low time? So how can i decode it with 1mhz microcontroller when the carrier is 38 khz?

And just to be sure. ic-prog and propic2 only support serial programming, right?

Last edited:

#### Nigel Goodwin

##### Super Moderator
Can someone tell me what is the carrier frequency? is it the high-low time? So how can i decode it with 1mhz microcontroller when the carrier is 38 khz?
You don't have to decode 38KHz. although a PIC at 4MHz would be easily capable of it - the TSOP receiver chip demodulates the signal and outputs a signal similar (but not identical) to the original modulation.

Check my PIC tutorials for examples.

And just to be sure. ic-prog and propic2 only support serial programming, right?

All remotely modern PIC's are serial programmed, only a few VERY, VERY old ones were parallel programmed.

However, the two software packages you mention support both serial port and parallel port programmers - both of which do serial programming.

##### New Member
Wow, there is a lot of stuff in your tutorials, did you all made that on your own? i must have been very time consuming.

Did someone already seen a factory made pcb? Its awesome! ( i just seen it ) all the components are collected by a tray and then literally launched at the pcb. All is soldered by a lead bath.In 30 seconds, a at least 3 hours for human pcb is made! (i know it's of topic)

EDIT:

WOOPS soory, i just understood .............actually mhz is 1 000 000 oscillation per second right? i tought it was 1000....... and khz is 1000. So i UNDERSTAND! Yay finally! it was the only thing that was restricting me from continuing my lasertag project! i should be very buzy for the next weeks.

Oh yeah, last question:

So the ir receiver (tsop or temic, they are the same...) demodulates a high to low( because its active low i think?) when there is a 38 khz continuous signal right? and a 0 when there is no signal? And what are the cycles / bursts??

Last edited:
Status
Not open for further replies.