Maker Pro
Maker Pro

Am I insane? (and 1 smaller question)

timothy48342

Nov 28, 2011
218
Joined
Nov 28, 2011
Messages
218
Small question first.
While reading up on programming PICs, I keep coming across this terminology.
VIL. (That's a big V and an IL subscript.)
As in:
The sequence that enters the device into the Programming/Verify mode places all other logic into the Reset state (the MCLR pin was initially at VIL)
That's from programming specification for the PIC10F200(and PIC10F2xx series) Page 3, section 3.1
pdf link

Also VIHH. (Big V, and subscript IHH) as in:
The devices are placed into a Program/Verify mode by
holding the GP1 and GP0 pins low while raising the
MCLR (VPP) pin from VIL to VIHH (see programming
specification).
From the PICF2xx datasheet. Page 50, section 9.12 pdf link
(The "Programming Specifications" they refer to is that first link.)

I also saw a reference to current with similar subscripts, but can't find the reference now. I was something like "...with the ability to draw IIL current..." Again, the first "I" is big and the remaining "IL" is a subscript and it was in the same context as the first ones. VIL and VIHH.

I guess the reason I need to know is when I'm ready to supply the Vpp pin with 12.5 to 13.5 V for programming, is that going to be a logical level that can have a reasonably high impeadance or is the chip going to be drawing significant current from that lead to the extent that I need to make sure there is some amount of current available? Like I-il or I-ihh current.

That's one question... just terminology. And maybe it doesn't matter. I'm buying $2 chips and I'm buying 10 of them, so I could just juice the first one and see what happens, I suppose.

Next question, "Am I insane??"
My strategy for learning about microcontrollers in going to be buy a cheap and small chip with limited features that doesn't have nearly the community surrounding it that other microcontrollers have.

Then on top of that, build my own programer as my introduction to the field and never ever buy a programmer or development board. (Going against advice that I have seen other newbies receive. And I'll build one for the serial port rather than the USB, so it really amounts to some wires and 1 or 2 resistors. ...I think... and maybe 13V's worth of batteries.) Of course, I'll have to come up with the code to drive the serial port manually, and I havn't looked into that, but that's just code and Windoze API. I think I can figure that out.

On top of that, I intend to light my first LED in assembler mostly because I want to learn Assembler (again). I'll download the Microchip compiler later after I learn how things work on a low-level and when I need it for larger programs.

So... Many of you probably have a grasp of the electronics skill level that I am at from my postings and that is my weak point, I know. I know some stuff! I don't know some other stuff!

Strong points: I can read a datasheet. (Ok, I can read 30% of a datasheet.) I'm pretty good at internet research. Google is my friend. Google is my best friend. (I think Google and I might already be married, I'll have to check the local laws as see.)

So, here is some more info about me.

My programming language of choice has been C++ for many years now. Programmed in Applesoft Basic many years ago. Programmed in Assembler at that same time, but not since. The 80-x86 infrastructure was to different to be convenient and C was so easy in comparison, that when C became available and the Apple 2 was fading, I made the switch to C and didn't bother with Assembler any more. I think I can re-learn Assem since the instruction set is so small and the architecture seems straightforward. (so far)

I am definitely going with the PIC series to start out and maybe just stick with that forever. (It's hard to say why now. I like that they continue to produce chips that have less features for VERY reasonable prices. I get the feeling that the other uC manufacturers are pushing the newest greatest thing always to get more money. And a few of you on here seem to swear by the PIC and that means something, too. I think I am hoping it fits my personality.)

But, I'm skipping the ready made development platforms and I believe I can skip buying a programmer or relying on bootstrapped chips. (I would end up having to reprogram a bootstrapped chip anyway when I inevitably do something wrong and wipe the bootstrap.)

So am I insane?
Am I biting off more than any normal person could chew?
Any caveats for me?
Has anyone else out there gone this route?

--timothy
(I've been planning on posting a "what should be my first microcontroller" thread, but I've read many, so this here is instead of that.) (And I'm gong to bed, then work, so it might be 24 hours or so before I wade through the responses.)
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Personally I think if you want to tinker with the PICs just get a commercial programmer and the paired software and focus on the programming and circuit building of your projects...

You can always revisit your idea to build your own programmer at a later date if it still interest you...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, you are dabbling in the black arts.

Most wizards are aware of such spells and incantations, yet they do not cast them. Instead the get pre-prepared spells in the form of programmers.

The most I would tend to worry about is the constraints I may need to work with to allow in circuit programming.
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
VIL - Voltage input low level. (/MCLR input) Defined to be <0.2*VDD.
VIHH - Voltage input programming level (still /MCLR input) 12.5V<VIHH<13.5V

Am I insane?

I have no idea. From what you write, not yet?
Seriously, it all come down to what your objective is. Do you want to learn to program and use a microcontroller, OR do you want to learn how to physically program the PIC controller?

I think I have said before that the PIC flavour is not my favorite, but that is personal. There are loads of possible candidates out there, but PIC has some good things too.

The first is the free IDE environment(as have other brands too). You can get PICSTART kits to jumpstart the programmer bit, if you don't insist on tormenting yourself.

Going for the barebone chip is good, not insane. This also implies that you need to do a bit of assembly, and here is the PIC-PITA for me. Programmers model is narrow, and fuzzy, at least compared to other flavours, but still not insane (bordercase :D )
C is good, I suppose, and you have to reinvent that from the C++ landscape. Personally I'll never use C++ below 32bit MCU families, if you can get compilers at all.

So go for it, whatever you select.

TOK ;)
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The biggest problem I see with your path is that you will end up with a programmer but no debugger. The PICKit 2 or 3 has in-circuit debug capability that interfaces with the development environment, letting you set breakpoints and single step on the actual target processor at look at variables as the program executes. I don't think Mchip even publishes the debug interface, so doing it yourself is not likely. You will eventually need in-circuit debug. The other problem is that the different families and even different members of them have different programming protocols, so your programming software will have to be updated for each new chip you want to use. This will get to be more than an annoyance.

But if you want to start out that way, go for it. I think you will eventually by a programmer/debugger though.

Bob
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
The biggest problem I see with your path is that you will end up with a programmer but no debugger. The PICKit 2 or 3 has in-circuit debug capability that interfaces with the development environment, letting you set breakpoints and single step on the actual target processor at look at variables as the program executes. I don't think Mchip even publishes the debug interface, so doing it yourself is not likely. You will eventually need in-circuit debug. The other problem is that the different families and even different members of them have different programming protocols, so your programming software will have to be updated for each new chip you want to use. This will get to be more than an annoyance.

But if you want to start out that way, go for it. I think you will eventually by a programmer/debugger though.

Bob

If you look at the ICD2 documentation, you'll see how that is connected to the target, just a few lines. I think I used 6 including power. It is 5 years ago since I did my last PIC design, but I did use the debugger and all that with no problems. These days I only just program a new batch now and then.

So, if you buy something, go for a programmer/debugger solution. It makes life so much easier.

TOK ;)
 

timothy48342

Nov 28, 2011
218
Joined
Nov 28, 2011
Messages
218
Ok,ok.
I think I was borderlined insane.

I'll go ahead with a programmer. I think PicKit2 as opposed to 3.

I had thought briefly about the debuggers being built in and I figured "I don't need that. When I program, I am my own debuger!" I debbug by adding additional commands in my code to give me feedback about what is going on. (display some text or make a log or something) But that might not work so well in the case of an uC. So, I might need the debugging down the line.

I think I'll still go with a very cheap and low-feature chip to start, so I don't have to learn about all those extra features. (And cause it's cheap!) Then only upgrade from the smaller chips when I need to.

I definately want to build my own programmer at some point and my philosophy was... "If I'm going to build a programmer anyway, why don't I just do that first even if it is a little more difficult?" But I see that I may want a programmer at some point, so the converse of that philosophy come into play as, "If I'm going to buy a programmer at some point anyway, why not buy it and use it first... CAUSE IT'S EASIER!?" So, thanks for that.

Thanks also to gorgon, for the terminolgy. V-il for Voltage input low and V-ih might could have meant voltage input high, but 13V is very high compared to the 5V power supply, so putting "hh" and saying V-ihh totally makes sense. I can sometimes guess at the meanings of those sorts of things, but this one was a bit of a stubling block. And that info will come in handy later after I buy a programmer and get my first Hello World LED to light up.

Also to gorgon, what did this mean? "Personally I'll never use C++ below 32bit MCU families, if you can get compilers at all." So you use assembler for those?

This raises another couple questions. The PicKit 2 and 3 would in my mind be expected to program ALL the PICs that Microchip has ever made prior to the release of the programmer. True?

And same question about the compiler and simulator that Microchip provides free. It works on ALL their chips? Or are there some chips that I will be required to program in Assembler. (It's ok. I kinda want to relearn the Assembler anyway, but it might affect my choice for my first chip. I think I'm still going with the PIC10 series which is a very easy assembler to learn.)

Ah, (*steve*), yes I am skirting the edge of the black arts, but I consider myself more of an alchemist than a wizard. Either way I don't want things to blow up in my face.

BobK, I noticed that the programming protocols are slightly differnet between different falilies of chips from just skimming sources, but I figured that if I pick a chip family, like the PIC10's and study the data sheet, I could pull it off, but I think, yeah, I was setting myself up for a frustrating experienced.

Thanks all of you.
--timothy
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
Also to gorgon, what did this mean? "Personally I'll never use C++ below 32bit MCU families, if you can get compilers at all." So you use assembler for those?

Yes, and no. I was thinking of differenciating between C and C++. C and assembler would be for the smaller versions. There are some extra overhead for the C++, in my experience, even if the micro in question have a C++ compiler.

When tinkering with a microcontroller, you are very close to the hardware, and I think assembler is ideal for hardwareclose functions. How you program your main application is of course up to you.
I've found that not all C-libraries for the hardware control routines is without bugs, and in my mind reducing possible variables when ploughing new land is good.

I suppose it is a bit different if you use a run-in library and existing hardware, but dealing with newly minted micros designed into a prototype PCB, it's good to reduce the number of variables.

It could also be that dealing with assembler for 30+ years has something to do with it. :D

TOK ;)
 
Top