Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PIC

0 views
Skip to first unread message

Steve Pearson

unread,
Aug 10, 2001, 11:39:06 AM8/10/01
to
Hi

Are there any newsgroups for PIC programming ? in particular using MPLAB ?

Cheers

Stephen


Jeroen

unread,
Aug 11, 2001, 6:43:16 AM8/11/01
to
http://www.piclist.com/techref/piclist/index.htm

Not a newsgroup but a mailing list with an online archive.

Jeroen

"Steve Pearson" <st...@g7anv.freeserve.co.uk> wrote in message
news:9l0v4h$sgd$1...@uranium.btinternet.com...

Steve Pearson

unread,
Aug 11, 2001, 1:25:06 PM8/11/01
to
Thanks for that, good site !!

I have a few quick questions before I plough through the website
............

Can cheap programmers be made ?

Can C, C++ or VB be used to program them and is software available for free
?

I have looked at the assembly code, it looks horrendous !! Is it really as
bad as it looks ?

I have been looking at the MPLAB Picstart+, is this a very expensive option,
is it more versatile/better than one I may build, and if so, in what way ?

Can PIC's be erased and reprogrammed ?

Cheers

Steve


"Jeroen" <Jero...@zippy.xs4all.nl> wrote in message
news:9l3289$6j8$1...@news1.xs4all.nl...

Byron A Jeff

unread,
Aug 11, 2001, 6:34:53 PM8/11/01
to
In article <9l3pn6$kf5$1...@neptunium.btinternet.com>,

Steve Pearson <st...@g7anv.freeserve.co.uk> wrote:
>Thanks for that, good site !!
>
>I have a few quick questions before I plough through the website

Most of your answers are there. But I'll take a quick crack at it anyway.

>............
>
>Can cheap programmers be made ?

Yes. If you decide on a Low Voltage Progamming chip, such as the 16F628 or
any of the 16F87X family, my trivial programmer works:

http://www.finitesite.com/d3jsys

One chip, one resistor.

Of course there are others.

>
>Can C, C++ or VB be used to program them and is software available for free
>?

C yes. Basic yes. VB and C++ no. Limited software is available for free.

Another free possibility is Jal by Wouter van Ooijen

The page can be found here:

http://www.xs4all.nl/~wf/wouter/pic/jal/

>
>I have looked at the assembly code, it looks horrendous !! Is it really as
>bad as it looks ?

Nope. It takes a bit of time to understand but with a 35 instruction set it
can be learned in an afternoon and mastered in less than a month. The key
item to understand is that all of the instructions are designed so that it's
easy to know their execution times. It makes it easy to create isosyncronous
code that executes at the same length of time no matter which path is taken.

>
>I have been looking at the MPLAB Picstart+, is this a very expensive option,
>is it more versatile/better than one I may build, and if so, in what way ?

Pros
----
1) High reliability
2) Excellent MPLAB integration
3) Good support
4) Can program nrealy all of the PIC parts

Cons
----
1) Cost
2) Cost
3) Cost

My current setup consists of my trivial programmer to put Wouter's Wloader on
the chip. I then self program the part using Linwload from my linux box.
Limited chip options (16F87X series) but I'm extremely happy with the setup.

>
>Can PIC's be erased and reprogrammed ?

Some can. Other's can't. All pics are either EPROM or EEPROM/Flash based. All
of the Flash based parts can be reprogrammed. The EPROM parts can when they
are encapulated in a ceramic windowed case (called JW parts). The EPROM
ones in plastic cases cannot be reprogrammed. They are called OTP (one time
programmable) parts.

As a piece of advise, take a look at the 16F628 and the 16F872 as starter
chips. They can both be low voltage programmed, have a ton of features, and
are among the cheapest of the reprogrammable parts.

Good Luck,

BAJ

Steve Pearson

unread,
Aug 12, 2001, 4:10:41 AM8/12/01
to

Hi Byron

Thanls for that reply, I think I will go for a cheap home built
programmer, I am suprised they are so simple !! Picstart+ seems a little
pricey just for something to mess about with :)

From what you say on assembly, I think I will give it a go, I enjoy
programming so it will be a challenge !

I don't know if anyone else has noticed this, or it's just my ISP's
newsgroups, but I am not getting all of the messages posted in the group. I
didn't get your reply from my newsgroup server, I went to Google just out of
interest as someone has mentioned it in another post. I have been missing
out on a lot of other posts too. I don't use newsgroups much and have never
noticed this before, maybe I should complain to BT !!

Cheers

Stephen

From: Byron A Jeff (by...@cc.gatech.edu)
Subject: Re: PIC
Newsgroups: sci.electronics.basics

View complete thread (9 articles)
Date: 2001-08-11 15:40:08 PST

In article <9l3pn6$kf5$1...@neptunium.btinternet.com>,
Steve Pearson <st...@g7anv.freeserve.co.uk> wrote:

>Thanks for that, good site !!
>
>I have a few quick questions before I plough through the website

Most of your answers are there. But I'll take a quick crack at it anyway.

>............


>
>Can cheap programmers be made ?

Yes. If you decide on a Low Voltage Progamming chip, such as the 16F628 or


any of the 16F87X family, my trivial programmer works:

http://www.finitesite.com/d3jsys

One chip, one resistor.

Of course there are others.

>


>Can C, C++ or VB be used to program them and is software available for free
>?

C yes. Basic yes. VB and C++ no. Limited software is available for free.

Another free possibility is Jal by Wouter van Ooijen

The page can be found here:

http://www.xs4all.nl/~wf/wouter/pic/jal/

>


>I have looked at the assembly code, it looks horrendous !! Is it really as
>bad as it looks ?

Nope. It takes a bit of time to understand but with a 35 instruction set it


can be learned in an afternoon and mastered in less than a month. The key
item to understand is that all of the instructions are designed so that it's
easy to know their execution times. It makes it easy to create isosyncronous
code that executes at the same length of time no matter which path is taken.

>


>I have been looking at the MPLAB Picstart+, is this a very expensive
option,
>is it more versatile/better than one I may build, and if so, in what way ?

Pros


----
1) High reliability
2) Excellent MPLAB integration
3) Good support
4) Can program nrealy all of the PIC parts

Cons
----
1) Cost
2) Cost
3) Cost

My current setup consists of my trivial programmer to put Wouter's Wloader
on
the chip. I then self program the part using Linwload from my linux box.
Limited chip options (16F87X series) but I'm extremely happy with the setup.

>


>Can PIC's be erased and reprogrammed ?

Some can. Other's can't. All pics are either EPROM or EEPROM/Flash based.

Ian Malcolm

unread,
Aug 11, 2001, 6:00:39 PM8/11/01
to
Steve Pearson wrote:

> Thanks for that, good site !!

http://www.piclist.com/

> I have a few quick questions before I plough through the website
> ............
> Can cheap programmers be made ?

How cheap do you want? The absolute minimal programmer uses a handful of
resistors and diodes. NOT recommended. A preferable programmer is the David
Tait design (several variants exist) using 7407 chip and some PNP transistors.
I like it because the C source for it is included and it is simple enough to
modify it for the newer PICs. It is DOS software, but I prefer CLI interface
tools as it is easier to script them for integrated development. I have a
button on the MPLAB toolbar that sends the current project to the Tait
programmer. This is under win95 or 98. It programs the 16f84 (and related
chips if you increase the buffer sizes)

On my todo list is to use it to program a 16f876 with Microchip's ICD hex and
build my own ICD. I have already written programming software for 24Cxx I2C
eeproms using the Tait hardware (Chip type detection, auto sizing and Intel Hex
support and it even auto sizes a chip I am reading without corrupting the
contents). Other stuff I am looking at is PIC 12C5xx and 16f628 support and
also variable Vcc for verifying (Upgrade from development to near production
quality)

> Can C, C++ or VB be used to program them and is software available for free
> ?

C is available, all I've seen are either PAY or crippled (Usually by only
supporting 16C84 or 16F84). C++ is not well suited to the PIC (Dynamic memory
allocation with no separate ram from the register file? you gotta be crazy to
want to do that) but I am sure someone will take a chunk of your money and
deliver some part of C++. VB? Is this a troll? Seriously VB is fat and not
very efficient (like most Bill Gates products nowadays) and is IMHO not suited
to ANY embedded system. There are 'traditional' Basic and Pascal compilers
available but you get what you pay for.

> I have looked at the assembly code, it looks horrendous !! Is it really as
> bad as it looks ?

Its not too bad if you have previous experience on 8 bit micros. Anyone coming
from a 6502 background should be able to cope but if you are used to the richer
instruction set of the Z80 or the comprehensive and mostly orthogonal set of
the 68000 family you will have to bite the bullet and not try to be elegant (No
parameter passing on a stack, (in fact no user accessible stack), No passing
inline data to a subroutine, No chance to modify the return address (or even
look at it).
However as it is a small instruction set you can be up to speed in it pretty
quick.
(and it beats a previous experience of mine programming a Z80 with NO RAM - An
experience so nasty that I wrote a state machine engine to abstract me from the
cold realities of the cruddy hardware and programmed that!)

> I have been looking at the MPLAB Picstart+, is this a very expensive option,
> is it more versatile/better than one I may build, and if so, in what way ?

I considered this but decided that MPLAB with ICD would suit me better if I was
going to buy a programmer. Programs the 16F8xx series and is an in circuit
debugger INTEGRATED with MPLAB. Fewer devices supported but lets you out of the
Burn Crash Erase cycle.

> Can PIC's be erased and reprogrammed ?

Ones with a C in the middle are EPROM and if windowed are UV erasable, Ones with
an F are Flash and are erasable by the programmer. (exception is 16C83 and
16C84 which were the first Flash erasable parts). Try to avoid doing
development on the C series plastic OTP parts, it doesn't take many wrong to get
more expensive than the windowed part. DONT CODE PROTECT A WINDOWED PART, THE
PROTECTION BIT IS PROTECTED AGAINST ERASURE (to make the chip more secure)

> Cheers
>
> Steve

Most of your questions are covered in more detail by the various FAQs at
http://www.piclist.com/ I hope you are now encouraged to dig deeper.
(and NO I am not a PICLIST member but I do get a fair amount of info from them)
--
Ian Malcolm. London, ENGLAND. (remove NOSPAM from email to reply)

Steve Pearson

unread,
Aug 12, 2001, 9:57:10 AM8/12/01
to

"Ian Malcolm" <i...@the-malcolms.freeserveNOSPAM.co.uk> wrote in message
news:3B75AB07...@the-malcolms.freeserveNOSPAM.co.uk...

> Its not too bad if you have previous experience on 8 bit micros. Anyone
coming
> from a 6502 background should be able to cope but if you are used to the
richer
> instruction set of the Z80 or the comprehensive and mostly orthogonal set
of
> the 68000 family you will have to bite the bullet and not try to be
elegant (No
> parameter passing on a stack, (in fact no user accessible stack), No
passing
> inline data to a subroutine, No chance to modify the return address (or
even
> look at it).
> However as it is a small instruction set you can be up to speed in it
pretty
> quick.
> (and it beats a previous experience of mine programming a Z80 with NO
RAM - An
> experience so nasty that I wrote a state machine engine to abstract me
from the
> cold realities of the cruddy hardware and programmed that!)

That sounds more hopeful, I did some VIC20 machine code and assembly when at
school, errrr, 18 years ago, hhhmm, was it that long ago ?!

I think I will abandon the C and BASIC methods infavour of the hard assembly
stuff :)

I will make my own programmer as the Picstart+ seems a bit much to pay for
someone who hasn't done any PIC programming at all, just to decide on which
to build, there are an awful lot of designs around.

Cheers

Steve

Byron A Jeff

unread,
Aug 12, 2001, 10:44:56 AM8/12/01
to
In article <9l5djf$7kp$1...@plutonium.btinternet.com>,
Steve Pearson <st...@g7anv.freeserve.co.uk> wrote:
-
- Hi Byron

Hi. I'm mailing a copy to you too because of your newsgroup issues.
-
- Thanls for that reply, I think I will go for a cheap home built
-programmer, I am suprised they are so simple !! Picstart+ seems a little
-pricey just for something to mess about with :)

Agreed. I want to reiterate that I think that the bootloader concept is the
absolute best way to do development. The chip can be programmed in-circuit,
it requires few additional components, and the best thing for me is that the
bootloader interface can double as a debugging port. Take a close look at
Wouter's wloader. I've found it invaluable. The only real cost is the amount
of memory it occupies. It ends up being a bit more than 1K. Given that
you may want to consider doing developement with a 16F876 or 16F877, each which
carries 8K of program memory. Then when you get the project done you can burn
it into a 16F872, 16F873, or 16F874 which have the same features but less
memory.


-
- From what you say on assembly, I think I will give it a go, I enjoy
-programming so it will be a challenge !

Assembly has it's good points and bad points. The good point is that you have
fine grained control of the software. Also you have minimal dependence on
programming tools, libraries, and environments. However it does take some
effort to master.

Even though I don't use it, it'd advise you to take a look at Jal. With a
true compiler, libraries, and from first glance a decent high level language
for microcontroller development, it may be a more gentle introduction to
the process.

BAJ

0 new messages