Hi there,
Anyone know of a PIC uC users group ? The one i found on
the web seems a bit outdated...last post i think was in 2005 or
something.
Thanks...
.
PIC users group?
PIC users group?
LEDs vs Bulbs, LEDs are winning.
There is the Piclist - alive and well
www.piclist.com - you have to subscribe as it says in the destructions, and if you also subscribe to the engineering topic as well, stand by for a gazillion emails.
The other that might help is searching the Pic Web Ring.
Colin
www.piclist.com - you have to subscribe as it says in the destructions, and if you also subscribe to the engineering topic as well, stand by for a gazillion emails.
The other that might help is searching the Pic Web Ring.
Colin
On a clear disk you can seek forever.
I used to read piclist a lot but don't so much anymore due to the rather oppressive nature of the egos there. You will learn a lot initially though the same issues keep coming up.
I recommend you find a number of projects and dig into how they were done. The internet is priceless that way. application notes are particularly good for this as they tend to explain why they did things the way they did. microchip has a lot of app notes Also, read other people's code - I find that is quite instructive.
Here are the subject areas that I recommend you understand:
- programming the chip
- driving LEDs and other direct loads
- driving transistors (bjts and fets) to drive larger loads
- switches
- PWM
- motor control
- character LCD control
- UART driving
- serial device interfaces - SPI & I2C
- ADC
- interrupts
- timers
while the list may seem long, it's not too bad, one good project will knock off half of them or more.
But, foremost, start building stuff with micros. Pick a simple project to start and then work up from there.
I recommend you find a number of projects and dig into how they were done. The internet is priceless that way. application notes are particularly good for this as they tend to explain why they did things the way they did. microchip has a lot of app notes Also, read other people's code - I find that is quite instructive.
Here are the subject areas that I recommend you understand:
- programming the chip
- driving LEDs and other direct loads
- driving transistors (bjts and fets) to drive larger loads
- switches
- PWM
- motor control
- character LCD control
- UART driving
- serial device interfaces - SPI & I2C
- ADC
- interrupts
- timers
while the list may seem long, it's not too bad, one good project will knock off half of them or more.
But, foremost, start building stuff with micros. Pick a simple project to start and then work up from there.
Hi philba,
Yeah sure
Actually, i'd be happy just to know one of the devices well right now.
I'll build up from there.
I dont know how much motor controlling i'll need to do but the
rest sounds good. My main applications will be lighting and
power management.
I noticed that these devices are not that well organized.
They skip some addresses for the registers and what not.
They work i guess but limited instruction set too
That reminds me...
Have you noticed that the 'simulator' doesnt really simulate
the device that well in that you cant trigger interrupts and
use switch closures, or did i miss something?
Is there a better simulator around perhaps?
Yeah sure
Actually, i'd be happy just to know one of the devices well right now.
I'll build up from there.
I dont know how much motor controlling i'll need to do but the
rest sounds good. My main applications will be lighting and
power management.
I noticed that these devices are not that well organized.
They skip some addresses for the registers and what not.
They work i guess but limited instruction set too
That reminds me...
Have you noticed that the 'simulator' doesnt really simulate
the device that well in that you cant trigger interrupts and
use switch closures, or did i miss something?
Is there a better simulator around perhaps?
LEDs vs Bulbs, LEDs are winning.
disorganized? wait till you start writing code. lolMrAl wrote:Hi philba,
Yeah sure
Actually, i'd be happy just to know one of the devices well right now.
I'll build up from there.
I dont know how much motor controlling i'll need to do but the
rest sounds good. My main applications will be lighting and
power management.
I noticed that these devices are not that well organized.
They skip some addresses for the registers and what not.
They work i guess but limited instruction set too
That reminds me...
Have you noticed that the 'simulator' doesnt really simulate
the device that well in that you cant trigger interrupts and
use switch closures, or did i miss something?
Is there a better simulator around perhaps?
the PIC family grew out of a very simple microcontroller to manage cable boxes (microchip used to be part of general instruments). the architecture has been utterly pushed to the limits and beyond. However, I don't think the register addresses not being contiguous is a big deal. at least compared to paging, banking, jump instructions, interrupts and so on.
yeah, the simulator is kind of a mess. I don't bother simulating anything these days but did use it for testing little snippets of assembly language code early on. I mostly use C these days, though. Frankly, I'd recommend you get an ICD2 or clone (or build one) and skip the simulator for the real thing. Even a good simulator has a hard time simulating the board environment of the chip.
also, depending on your applications, you might just skip the 16F family and start with the 18F series. its a definite improvement. If you plan on using 8 or 14 pin PICs, you will have to deal with the 16F series.
Hi again,
That's very interesting about how it grew. I guess they
started with something simple and just kept tacking things
on to make it more powerful, instead of redesign.
I've been fooling around writing some mock code just to
see how well i know the instruction set. Looks like i
didnt know it that well. Now im getting the hang of it,
but it takes time. Lucky i found the manual and the
data sheet.
I mentioned the register set up because that's the first thing
i noticed when i looked at the memory organization. Strange
that they skipped some addresses.
Do you know if there is a list somewhere that shows all of the
PICs and what functions they have (like A/D) ?
Right now im looking at the low end PICs like the 12F series.
I'll take a look at the 16F series too. Does this mean the
higher up numbers are better devices?
What would you use to program all of these chips as it looks like
there is no programmer that does them all?
Oh yeah, most important, why do they seem to use larger hex numbers
to address memory (like 0x90) even though you have to switch
to bank 1 first ? I would have thought you either use 0x90 or you
switch to bank1 and 0x10 for example. It seems that they do both:
switch to bank 1 *and* use the higher hex numbers like 0x90,
0x93, etc. Does this make sense?
That's very interesting about how it grew. I guess they
started with something simple and just kept tacking things
on to make it more powerful, instead of redesign.
I've been fooling around writing some mock code just to
see how well i know the instruction set. Looks like i
didnt know it that well. Now im getting the hang of it,
but it takes time. Lucky i found the manual and the
data sheet.
I mentioned the register set up because that's the first thing
i noticed when i looked at the memory organization. Strange
that they skipped some addresses.
Do you know if there is a list somewhere that shows all of the
PICs and what functions they have (like A/D) ?
Right now im looking at the low end PICs like the 12F series.
I'll take a look at the 16F series too. Does this mean the
higher up numbers are better devices?
What would you use to program all of these chips as it looks like
there is no programmer that does them all?
Oh yeah, most important, why do they seem to use larger hex numbers
to address memory (like 0x90) even though you have to switch
to bank 1 first ? I would have thought you either use 0x90 or you
switch to bank1 and 0x10 for example. It seems that they do both:
switch to bank 1 *and* use the higher hex numbers like 0x90,
0x93, etc. Does this make sense?
LEDs vs Bulbs, LEDs are winning.
Al,
If you download the data sheet (plus errata) from Microchip this will lay out the registers.
One manual that is worth downlaoding is the 'Mid Range' manual - a mighty tome of about 800 pages - but it goes into in depth discussion of all the parts - some 12F's are cut down mid range devices.
Microchip also have loads of code snippets and some interesting manuals such as tips and tricks for the 12F series.
The other thing that is worth hunting down are the 'Masters' series of demonstrations. They go step by step - unfortunately - these are well hidden on the website as they are the material used for the big Mchip conventions. A search of the Piclist or the Mchip forum will often provide the links - I haven't tried Google - but the way they are presented in chunks is really useful.
You might also want to check out the Pic archives at the UK competitior EPE magazine - especially the tutorials - they actually made their own IDE and programmiing gubbins.
Do you intend to program in assembler or in one of the many variants of basic or 'c' ?
Colin
If you download the data sheet (plus errata) from Microchip this will lay out the registers.
One manual that is worth downlaoding is the 'Mid Range' manual - a mighty tome of about 800 pages - but it goes into in depth discussion of all the parts - some 12F's are cut down mid range devices.
Microchip also have loads of code snippets and some interesting manuals such as tips and tricks for the 12F series.
The other thing that is worth hunting down are the 'Masters' series of demonstrations. They go step by step - unfortunately - these are well hidden on the website as they are the material used for the big Mchip conventions. A search of the Piclist or the Mchip forum will often provide the links - I haven't tried Google - but the way they are presented in chunks is really useful.
You might also want to check out the Pic archives at the UK competitior EPE magazine - especially the tutorials - they actually made their own IDE and programmiing gubbins.
Do you intend to program in assembler or in one of the many variants of basic or 'c' ?
Colin
On a clear disk you can seek forever.
yes go here http://www.microchip.com/stellent/idcpl ... &nodeId=74 and then click on one of the spreadsheet icons. you'll get a sortable list. click on the martini glass icon for a parameteric search.Do you know if there is a list somewhere that shows all of the
PICs and what functions they have (like A/D) ?
good question. probably to make it clear that you are operating in the next page. I suspect they use that in the banksel pseudo op to get to the right bank. That banking thing is such a nasty hack. It kind of gripes me to read pic code and see 1/4 of the instructions are twiddling rpo and 1.Oh yeah, most important, why do they seem to use larger hex numbers to address memory (like 0x90) even though you have to switch
to bank 1 first ?
It should be no suprise that the naming scheme is irregular. The 12F series are just smaller but have the same core. In the 8 bit line, there are 12, 14 and 16 bit instruction cores. Most of tthe 12F and 16F series have 14 bit cores (14 bit instructions), some of the 12F and 12C are 12 bit cores. all of the 18F are 16 bit cores. got it? pop quiz in the morning.Right now im looking at the low end PICs like the 12F series.
I'll take a look at the 16F series too. Does this mean the
higher up numbers are better devices?
Hi again,
Colin:
I downloaded everything i could find, but i was hoping i would
get some hands on experienced replies right here. Nothing beats
talking to someone who has already used one
Do you know if EPE has a simulator too?
I'll be programming in assembler almost exclusively, to stay
as close as possible to the hardware. I love C, but i feel it's
too abstracted from the hardware itself.
philba:
I'll take a look at that link...thanks.
Yeah i noticed that too...that bank switching is nuts.
Nothing like making an already possibly difficult task
more difficult, or making an easy task just plain
annoying. I guess this means the compilers dont
automatically insert the bank switching code then,
it has to be hand coded?
Oh the naming scheme is irregular too? Well yeah no
surprise there ha ha ha...at least the general order
of everything is always irregular ha ha.
One more thing...about the 12bit A/D devices...do you
happen to know what will program them (low cost)?
cwaugs:
Took a quick look at the programmers, not sure if any fit
my needs or not just yet.
Colin:
I downloaded everything i could find, but i was hoping i would
get some hands on experienced replies right here. Nothing beats
talking to someone who has already used one
Do you know if EPE has a simulator too?
I'll be programming in assembler almost exclusively, to stay
as close as possible to the hardware. I love C, but i feel it's
too abstracted from the hardware itself.
philba:
I'll take a look at that link...thanks.
Yeah i noticed that too...that bank switching is nuts.
Nothing like making an already possibly difficult task
more difficult, or making an easy task just plain
annoying. I guess this means the compilers dont
automatically insert the bank switching code then,
it has to be hand coded?
Oh the naming scheme is irregular too? Well yeah no
surprise there ha ha ha...at least the general order
of everything is always irregular ha ha.
One more thing...about the 12bit A/D devices...do you
happen to know what will program them (low cost)?
cwaugs:
Took a quick look at the programmers, not sure if any fit
my needs or not just yet.
LEDs vs Bulbs, LEDs are winning.
Simulator no, built in debugger yes.Do you know if EPE has a simulator too?
The software with the best simulator I've found is the one that comes with FED C - in fact the similator is the only reason I use it.
Other than assembly itself, the best programming language is XCSB structured basic - it looks like 'C' but isn't and produces very very tight code.
There is also JAL which is Pascal like - the original author no longer supports it, but there is a vast and large group that continues to expand its capabilities.
IF you arer a Java buff there is Muvium - this has been presented at a MChip Masters and MChip have so it is said taken a close interest in it.
One utility that might be useful is that from Mchip themselves, although it is now tucked away on their website - Maestro - this produces relocatable code and templates for hardware features. The only problem is that Mchip produced code has to be read carefully as there are errors in some of it - though none in Maestro as far as I'm aware.
Some books I can recommend (available from Amazon ) are Embedded Design with the PIC18F452 Microcontroller John B. Peatman (www.picbook.com) this is only for the 18F series that are in fact easier to write programs for as their banking is implemented in a different way to the 16 and 12F series, and unless you write a big program, will never have to switch banks at all.
The other book is for the 16 and 18F series and actually comes with a students version of CCS 'C' Embedded C Programming and the Microchip Pic.
I've got a nifty little utility that allows you to pictorally set up various registers - but for the 16F series.
As you wish to stay with assembler, I'd suggest two things - one download from EPE site in the PicTricks folder things like PCLATH (page switching) and the other one (whose name I forget) that concerns bank switching code.
MPLAB does allow page switching to some extent as it recognises the pseudo macro PAGESELECT and BANKSELECT directives - it does work better with locatable code than absolute code.
I've got some code examples on my website.
As far as programmers are concerned - there are plenty! If you want to stick to Microchipish type ones then have a look at Olimex they do a passable imitation of Mchip stuff.
I'd suggest though paying for a programmer that also has some sort of debug/IDE simulator built into it - it's the poor mans alternative to an Emulator.
Look at Mikroelektronika, FORED and the EPE programmer.
The John Peatman book uses a University developed structured assembler which will work with the 16 and 18 series.
Colin
On a clear disk you can seek forever.
Forgot to say there is a rough guidline as to what the 16F pics have in hardware.
If they have a 7 as the second number such as 87x then they will have an ADC and the 3rd number, the higher it is, the more pins and larger program memory.
If they start with a 6 then they will have a comparator, if 62x a compartor and possibly an ADC. After that it seems to be pluck a number out of the marketing managers hat!
Colin
If they have a 7 as the second number such as 87x then they will have an ADC and the 3rd number, the higher it is, the more pins and larger program memory.
If they start with a 6 then they will have a comparator, if 62x a compartor and possibly an ADC. After that it seems to be pluck a number out of the marketing managers hat!
Colin
On a clear disk you can seek forever.
I don't think the numbering scheme is all that consistant. For example, the 16F88 has ADCs and comparators. The 16F87 doesn't have ADC. The 16F819 has ADCs and PWM. And I suspect they pluck their numbers from some place other than a hat, ahem...
Al, the compilers take care of all that bank, page, pclath... stuff. Though, knowing what goes on underneath is important. It is very easy to write bloated code. I think the architecture is a nightmare for compiler designers...
oh yeah, al, for some true fun, take a look at how the PIC does indirection. yee-haw!
Al, the compilers take care of all that bank, page, pclath... stuff. Though, knowing what goes on underneath is important. It is very easy to write bloated code. I think the architecture is a nightmare for compiler designers...
oh yeah, al, for some true fun, take a look at how the PIC does indirection. yee-haw!
Hi again,
Thanks for all the tips and stuff guys.
Colin:
What is the FED C and does the simulator allow triggering interrups
and switch closures and stuff like that?
Philba:
I was looking at indirection via registers 0x00 and FSR. I kinda
liked that though. Im pretty sure i will need this in the future.
It looks good for accessing 'arrays' too.
Another strange thing came up while reading the docs...
MicroChip says that the (12F675) EEPROM is made for more or less often
updated data, and if the data is not often updated then there needs
to be a 'refresh' done. Thing is, they dont say how often it has to
be done nor what would be the max time to wait before doing
a refresh! Seconds, minutes, hours, days, etc., it could be
anything. Any info on this anywhere?
Thanks for all the tips and stuff guys.
Colin:
What is the FED C and does the simulator allow triggering interrups
and switch closures and stuff like that?
Philba:
I was looking at indirection via registers 0x00 and FSR. I kinda
liked that though. Im pretty sure i will need this in the future.
It looks good for accessing 'arrays' too.
Another strange thing came up while reading the docs...
MicroChip says that the (12F675) EEPROM is made for more or less often
updated data, and if the data is not often updated then there needs
to be a 'refresh' done. Thing is, they dont say how often it has to
be done nor what would be the max time to wait before doing
a refresh! Seconds, minutes, hours, days, etc., it could be
anything. Any info on this anywhere?
LEDs vs Bulbs, LEDs are winning.
Who is online
Users browsing this forum: No registered users and 22 guests