PIC Assembler.

"Don McKenzie" <look@mysig.com> wrote in message
news:471e59e8$0$14825$afc38c87@news.optusnet.com.au...
ian field wrote:
Many thanks, the first link is *very* interesting - I may already have
the other 2 saved. The Elmer 160 starts off simple enough but the code
examples quickly get heavy going, I need to go over a lot of simpler code
over and over until I get the hang of it.

have a look at:
http://www.dontronics.com/see.html
this may give you a different slant on assembly.

Don...
It looks to be mostly Parallax - and I've seen their price list!!!!!
 
"Tom2000" <abuse@earthlink.net> wrote in message
news:1q1rh3llm1jsi61k7347cje0g4k0gjobkb@4ax.com...
On Mon, 22 Oct 2007 15:05:25 GMT, "ian field" <dai.ode@ntlworld.com
wrote:

Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of Google
search
string, but most of the tutorials I've found assume previous experience
at
writing assy for microprocessors.

Another problem is most of what I've found is HTML which is untidy to
save
for later study and many pages lose their image files after being saved
to
disk (anyone know why that happens?). Any help appreciated.

TIA.


Here's a nice tutorial series for beginners:

http://amqrp.org/elmer160/lessons/
[...]

Whenever I come across the phrases "Linker scripts" or "Manifest constants",
I reach for my revolver :)
 
ian field wrote:
"Don McKenzie" <look@mysig.com> wrote in message
news:471e59e8$0$14825$afc38c87@news.optusnet.com.au...
ian field wrote:
Many thanks, the first link is *very* interesting - I may already have
the other 2 saved. The Elmer 160 starts off simple enough but the code
examples quickly get heavy going, I need to go over a lot of simpler code
over and over until I get the hang of it.
have a look at:
http://www.dontronics.com/see.html
this may give you a different slant on assembly.

Don...

It looks to be mostly Parallax - and I've seen their price list!!!!!
If you have a closer look, James Newton of piclist.com, has gone to the
trouble of decoding it into microchip mnemonics. (pure pic assembler)

Don...



--
Don McKenzie

Affiliate Program: http://www.dontronics.com/affiliate
Site Map: http://www.dontronics.com/sitemap
E-Mail Contact Page: http://www.dontronics.com/email
No More Damn Spam: http://www.wizard-of-oz.com

Serial OLED uses standard micro-SD memory cards.
http://www.dontronics-shop.com/product.php?productid=16659
 
"ian field" <dai.ode@ntlworld.com> wrote in message
news:kcpTi.15009$qv1.3845@newsfe2-gui.ntli.net...
"Richard Seriani" <richard_s633@cox.net> wrote in message
news:vPjTi.11299$BT5.19@newsfe18.lga...

"ian field" <dai.ode@ntlworld.com> wrote in message
news:V_2Ti.20084$0z6.19665@newsfe7-win.ntli.net...
Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of Google
search string, but most of the tutorials I've found assume previous
experience at writing assy for microprocessors.

Another problem is most of what I've found is HTML which is untidy to
save for later study and many pages lose their image files after being
saved to disk (anyone know why that happens?). Any help appreciated.

TIA.
Ian,

Try these. Some are better than others and some have mistakes - but,
you'll be able to spot those within a short time.

http://www.mikroe.com/en/books/picbook/picbook.htm
http://www.winpicprog.co.uk/pic_tutorial.htm
http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm

Saving these to your hard drive can be done with a right-click and save
as. It creates two files, one is the html document and the other is a
file
folder with the graphics. At least, it does on my Windoz machine.

In a later post, someone also recommended the PIC Elmer 160 tutorial.
That
is a good one and each of the lessons downloads as a PDF.

snip

Many thanks, the first link is *very* interesting - I may already have the
other 2 saved. The Elmer 160 starts off simple enough but the code
examples
quickly get heavy going, I need to go over a lot of simpler code over and
over until I get the hang of it.
It's absolutely essential that you get to write the few lines needed to
flash an LED. If you can get there and can see why you've caused the LED to
flash then -ALL- other PIC programming is downhill.
The "mstracey" link that Richard supplied, will do this, (upto "tutorial
#5") but more importantly, the how's and why's of the individual
instructions are described nicely.

Try and ignore anything written by Microchip.
Sadly though, you may have to make use of Microchip's, bloated, inane piece
of s***, known as "MPLAB", but remember, the hoops it forces you to jump
through, are nothing to do with actual PIC programming but more reflect the
mindset of Microchip's C pogrammers.
 
Jonathan Kirwan wrote:

On Tue, 23 Oct 2007 15:22:42 +0100, Eeyore
rabbitsfriendsandrelations@hotmail.com> wrote:


Jonathan Kirwan wrote:


Eeyore wrote:


Assembly language makes NO sense whatever to my mind in the modern world.

Flat, dead wrong. But then, I'm not surprised.

If you are seriously interested in defending that position, I will
present you with narrow, specific cases that come from __actual__
projects in real situations, complete with detailed analysis about why
and see if you can find a high level language to seriously promote
your above point. I will expect you to work, though.

Otherwise, I can tell you from actual experience with actual projects
that you are wrong -- in the modern world, no less.

On what architecture and comparing with what HLL ?


I am NOT thinking of any particular HLL, since the solution to one of
the problems/cases I have in mind cannot be solved properly in any I
know of. (There are many other cases which cannot be solved in C or
C++, but can in CLU or some other HLL -- but I'm eliminating those
thoughts just in case you happen to be familiar with every HLL I am
familiar with.) The architecture I'm thinking of is the case for most
microcontrollers without branch detection and cache. Even in those
cases, it probably applies, but the detailed answer will depend a
little.

Mostly, my problem with your statement is that it is obviously made
from the perspective of a god, which I know you are not. You don't
have the perspective to say it. And I'm prepared to show you cases
(more than one) which can give the lie to it and demonstrate that you
lack perspective in making it. If you hadn't been so sure of yourself
and had toned down the sweeping nature, I'd have left it be. But you
said what you said and I have a few cases to easily take it down a
notch or two.

I could tell you the upshot of one of the cases, right away, without a
lot of todo. And if you go back and use google to read my posts in
comp.arch.embedded, you will actually find some cases I mentioned
there for exactly this purpose. So you don't have to be caught
flat-footed, if you don't want to be. But they have been examined by
others and I don't recall anyone doing anything but finding the cases
sufficient to make the point. You could be the first to find the
flaws in what I will write, though. And these are actual cases from
real projects I've faced. Not made up school problems.

Jon
Good reply.
Spoken like a true experienced coder in the field of uC. I'm glad
you stepped up to the plate.



--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
 
On Tue, 23 Oct 2007 14:37:55 GMT, "ian field" <dai.ode@ntlworld.com>
wrote:

Thanks - that starts off simple enough and is mostly well written, but it
takes off a bit too fast, I've read it through but found on each successive
chapter I was skipping over the code examples and just getting what I could
from the text. Its a great tutorial but I need a little slower curve.
Ian, if you run into anything you don't understand while you're
working through any tutorial, feel free to ask for clarification here.
Lots of us will be more than happy to help you out.

Tom
 
Tom2000 wrote:

Eeyore <rabbitsfriendsandrelations@hotmail.com> wrote:
Anthony Fremont wrote:
Eeyore wrote:

Seriously, the need to use assembler vanished
about 30+ years ago.

What an absurd statement.

Why would you NEED to use assembler do please tell.

12F683
Would you care to elaborate ?

Graham
 
Tim Wescott wrote:

Eeyore wrote:
Tim Wescott wrote:
Eeyore wrote:
ian field wrote:

Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of Google search
string, but most of the tutorials I've found assume previous experience at
writing assy for microprocessors.

Why would you want to use assembly language ?

IIRC, there's a neat free high level language for PICs but since I don't use
PICs, I never bookmarked it.

Several reasons:

For _really teeny_ bits of code it's easier to just write in assembly
than to deal with the C runtime environment.

Who said anything about C ? Blech !


For _really fast_ bits of code you'll almost always get more speed out
of assembly than compiled C.

Who said anything about C ? Blech !


For _really odd_ bits of code you often can't do things in C at all, or
you get absurd levels of code bloat compared to what you can do in assembly.

Who said anything about C ? Blech !


There's no better way to learn how a microprocessor really works.

I disagree. Obsessing with operation at register level is academically interesting
but of almost no value to a coder and 'getting the job done'.


Many micro-based projects require just a bit of assembly programming to
really work well, and you can't do that unless you've got someone on
your team who can work in assembly. Even when they don't, understanding
what the processor is doing 'underneath C' can be invaluable for debugging.

Who said anything about C ? Blech !


In the embedded world we call people with the skill set to go with your
attitude "applications programmers".

It's not a compliment.
'Applications' on an 8051 ?

It seems that the very mention of an HLL has become so inextricably linked to 'C' that
any sensible discussion of the use of a HLL on a uC is no longer possible.

Have you ever even encountered PL/M ?

Just because Intel no longer sell / support it doesn't mean it's not relevant to this
discussion. And furthermore, I often inspect the assembler it produces out of interest.
That's one reason I see no need to code natively in it.

Graham
 
"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote in message
news:471F2376.8A58450A@hotmail.com...
Tim Wescott wrote:

Eeyore wrote:
Tim Wescott wrote:
Eeyore wrote:
ian field wrote:

Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of
Google search
string, but most of the tutorials I've found assume previous
experience at
writing assy for microprocessors.

Why would you want to use assembly language ?

IIRC, there's a neat free high level language for PICs but since I
don't use
PICs, I never bookmarked it.

Several reasons:

For _really teeny_ bits of code it's easier to just write in assembly
than to deal with the C runtime environment.

Who said anything about C ? Blech !


For _really fast_ bits of code you'll almost always get more speed out
of assembly than compiled C.

Who said anything about C ? Blech !


For _really odd_ bits of code you often can't do things in C at all,
or
you get absurd levels of code bloat compared to what you can do in
assembly.

Who said anything about C ? Blech !


There's no better way to learn how a microprocessor really works.

I disagree. Obsessing with operation at register level is academically
interesting
but of almost no value to a coder and 'getting the job done'.


Many micro-based projects require just a bit of assembly programming
to
really work well, and you can't do that unless you've got someone on
your team who can work in assembly. Even when they don't,
understanding
what the processor is doing 'underneath C' can be invaluable for
debugging.

Who said anything about C ? Blech !


In the embedded world we call people with the skill set to go with your
attitude "applications programmers".

It's not a compliment.

'Applications' on an 8051 ?

It seems that the very mention of an HLL has become so inextricably linked
to 'C' that
any sensible discussion of the use of a HLL on a uC is no longer possible.

Have you ever even encountered PL/M ?

Just because Intel no longer sell / support it doesn't mean it's not
relevant to this
discussion. And furthermore, I often inspect the assembler it produces out
of interest.
That's one reason I see no need to code natively in it.

Graham
PL/M isn't relevant to my original question about PIC assy', and when
someday I might progress to making PIC a career boost potential employers
are somewhat more likely to require experience with C PIC HLL than PL/M.
 
"Tom2000" <abuse@earthlink.net> wrote in message
news:17uth3pf693g6qcs7j58qv5hob5h3sk1er@4ax.com...
On Tue, 23 Oct 2007 14:37:55 GMT, "ian field" <dai.ode@ntlworld.com
wrote:


Thanks - that starts off simple enough and is mostly well written, but it
takes off a bit too fast, I've read it through but found on each
successive
chapter I was skipping over the code examples and just getting what I
could
from the text. Its a great tutorial but I need a little slower curve.


Ian, if you run into anything you don't understand while you're
working through any tutorial, feel free to ask for clarification here.
Lots of us will be more than happy to help you out.

Tom
Thanks, at the moment I've got a sizeable collection of stuff I googled that
needs sorting into folders so I can find the useful one's later, there were
some good links posted here yesterday and I also found half a box of front
cover CD/DVDs - about 4 or 5 are PIC related.
 
"john jardine" <john.jardine@idnet.co.uk> wrote in message
news:13hsufai8ofh17b@corp.supernews.com...
"Tom2000" <abuse@earthlink.net> wrote in message
news:1q1rh3llm1jsi61k7347cje0g4k0gjobkb@4ax.com...
On Mon, 22 Oct 2007 15:05:25 GMT, "ian field" <dai.ode@ntlworld.com
wrote:

Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of Google
search
string, but most of the tutorials I've found assume previous experience
at
writing assy for microprocessors.

Another problem is most of what I've found is HTML which is untidy to
save
for later study and many pages lose their image files after being saved
to
disk (anyone know why that happens?). Any help appreciated.

TIA.


Here's a nice tutorial series for beginners:

http://amqrp.org/elmer160/lessons/

[...]

Whenever I come across the phrases "Linker scripts" or "Manifest
constants",
I reach for my revolver :)
What were you planning to shoot?
 
"john jardine" <john.jardine@idnet.co.uk> wrote in message
news:13ht0kvnvnvt7f7@corp.supernews.com...
"ian field" <dai.ode@ntlworld.com> wrote in message
news:kcpTi.15009$qv1.3845@newsfe2-gui.ntli.net...

"Richard Seriani" <richard_s633@cox.net> wrote in message
news:vPjTi.11299$BT5.19@newsfe18.lga...

"ian field" <dai.ode@ntlworld.com> wrote in message
news:V_2Ti.20084$0z6.19665@newsfe7-win.ntli.net...
Does anyone have a link to any tutorials for PIC assembly?

Over the past few months I've been trying many permutations of Google
search string, but most of the tutorials I've found assume previous
experience at writing assy for microprocessors.

Another problem is most of what I've found is HTML which is untidy to
save for later study and many pages lose their image files after being
saved to disk (anyone know why that happens?). Any help appreciated.

TIA.
Ian,

Try these. Some are better than others and some have mistakes - but,
you'll be able to spot those within a short time.

http://www.mikroe.com/en/books/picbook/picbook.htm
http://www.winpicprog.co.uk/pic_tutorial.htm
http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm

Saving these to your hard drive can be done with a right-click and save
as. It creates two files, one is the html document and the other is a
file
folder with the graphics. At least, it does on my Windoz machine.

In a later post, someone also recommended the PIC Elmer 160 tutorial.
That
is a good one and each of the lessons downloads as a PDF.

snip

Many thanks, the first link is *very* interesting - I may already have
the
other 2 saved. The Elmer 160 starts off simple enough but the code
examples
quickly get heavy going, I need to go over a lot of simpler code over and
over until I get the hang of it.


It's absolutely essential that you get to write the few lines needed to
flash an LED. If you can get there and can see why you've caused the LED
to
flash then -ALL- other PIC programming is downhill.
The "mstracey" link that Richard supplied, will do this, (upto "tutorial
#5") but more importantly, the how's and why's of the individual
instructions are described nicely.

Try and ignore anything written by Microchip.
Sadly though, you may have to make use of Microchip's, bloated, inane
piece
of s***, known as "MPLAB", but remember, the hoops it forces you to jump
through, are nothing to do with actual PIC programming but more reflect
the
mindset of Microchip's C pogrammers.
Are any of the older versions of MPLAB any less "bloated"?
 
On Tue, 23 Oct 2007 19:27:38 -0400, Jamie
<jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> wrote:

snip
Spoken like a true experienced coder in the field of uC. I'm glad
you stepped up to the plate.
And I doubt Graham will respond to the challenge. He probably has
either read what I've written before or else can, now prodded, think
of a few reasons and evidence that makes his claims clearly false.

Jon
 
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote
Tim Wescott wrote:
Eeyore wrote:

Who said anything about C ? Blech !

In the embedded world we call people with the skill set to go with your
attitude "applications programmers".

It's not a compliment.

'Applications' on an 8051 ?

It seems that the very mention of an HLL has become so inextricably linked
to 'C' that any sensible discussion of the use of a HLL on a uC is no longer
possible.

Have you ever even encountered PL/M ?

Just because Intel no longer sell / support it doesn't mean it's not
relevant to this discussion. And furthermore, I often inspect the assembler
it produces out
of interest.
That's one reason I see no need to code natively in it.


PL/M isn't relevant to my original question about PIC assy', and when
someday I might progress to making PIC a career boost potential employers
are somewhat more likely to require experience with C PIC HLL than PL/M.
If you're hell bent on programming a PIC, PL/M certainly will be of no use to
you. That wasn't my point however.

On the other matter, why are you so interested in PICs (as opposed to 8051
family or any other) ? One nice thing about 8051 is that the basic architecture
doesn't change from model to model. I've also heard that the data on the chips
is more reliable.

Graham
 
Jonathan Kirwan wrote:

Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> wrote:

Spoken like a true experienced coder in the field of uC. I'm glad
you stepped up to the plate.

And I doubt Graham will respond to the challenge. He probably has
either read what I've written before or else can, now prodded, think
of a few reasons and evidence that makes his claims clearly false.
I can think of no reason whatever to use a language (assembler) that requires
more than one line of code to even add two numbers, never mind anything more
complex.

Graham
 
"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote in message
news:471F9531.6554D522@hotmail.com...
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote
Tim Wescott wrote:
Eeyore wrote:

Who said anything about C ? Blech !

In the embedded world we call people with the skill set to go with
your
attitude "applications programmers".

It's not a compliment.

'Applications' on an 8051 ?

It seems that the very mention of an HLL has become so inextricably
linked
to 'C' that any sensible discussion of the use of a HLL on a uC is no
longer
possible.

Have you ever even encountered PL/M ?

Just because Intel no longer sell / support it doesn't mean it's not
relevant to this discussion. And furthermore, I often inspect the
assembler
it produces out
of interest.
That's one reason I see no need to code natively in it.


PL/M isn't relevant to my original question about PIC assy', and when
someday I might progress to making PIC a career boost potential employers
are somewhat more likely to require experience with C PIC HLL than PL/M.

If you're hell bent on programming a PIC, PL/M certainly will be of no use
to
you. That wasn't my point however.

On the other matter, why are you so interested in PICs (as opposed to 8051
family or any other) ? One nice thing about 8051 is that the basic
architecture
doesn't change from model to model. I've also heard that the data on the
chips
is more reliable.

Graham
Maybe I'm just more comfortable following what everyone else is doing - Who
knows, if I do well at PICs I might even have a look at the AVR.
 
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote

On the other matter, why are you so interested in PICs (as opposed to 8051
family or any other) ? One nice thing about 8051 is that the basic
architecture doesn't change from model to model. I've also heard that the
data on the
chips is more reliable.


Maybe I'm just more comfortable following what everyone else is doing - Who
knows, if I do well at PICs I might even have a look at the AVR.
I think you're mistaken to imagine everyone uses PICs. It's more of a joke than
reality AIUI.

Graham
 
Eeyore wrote:
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote

On the other matter, why are you so interested in PICs (as opposed
to 8051 family or any other) ? One nice thing about 8051 is that
the basic architecture doesn't change from model to model. I've
also heard that the data on the chips is more reliable.


Maybe I'm just more comfortable following what everyone else is
doing - Who knows, if I do well at PICs I might even have a look at
the AVR.

I think you're mistaken to imagine everyone uses PICs. It's more of a
joke than reality AIUI.
You're just being anti-PIC. Do you really think there are more people using
805x parts than PICs? Considering that you have little experience in
programming micros and aparently none with PICs, I'm at a complete loss to
understand why you want to ram PL/M and 805x down everyones throat every
time this stuff comes up. What is it exactly that is so great about PL/M
and so "Bleh" about C?
 
"Anthony Fremont" <nobody@noplace.net> wrote in message
news:13hv9nloaogla3f@news.supernews.com...
Eeyore wrote:
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote

On the other matter, why are you so interested in PICs (as opposed
to 8051 family or any other) ? One nice thing about 8051 is that
the basic architecture doesn't change from model to model. I've
also heard that the data on the chips is more reliable.


Maybe I'm just more comfortable following what everyone else is
doing - Who knows, if I do well at PICs I might even have a look at
the AVR.

I think you're mistaken to imagine everyone uses PICs. It's more of a
joke than reality AIUI.

You're just being anti-PIC. Do you really think there are more people
using 805x parts than PICs? Considering that you have little experience
in programming micros and aparently none with PICs, I'm at a complete loss
to understand why you want to ram PL/M and 805x down everyones throat
every time this stuff comes up. What is it exactly that is so great about
PL/M and so "Bleh" about C?
Isn't AVR what Atmel would like everyone to use instead of 805x parts?
 
ian field wrote:
"Anthony Fremont" <nobody@noplace.net> wrote in message
news:13hv9nloaogla3f@news.supernews.com...
Eeyore wrote:
ian field wrote:

"Eeyore" <rabbitsfriendsandrelations@hotmail.com> wrote

On the other matter, why are you so interested in PICs (as opposed
to 8051 family or any other) ? One nice thing about 8051 is that
the basic architecture doesn't change from model to model. I've
also heard that the data on the chips is more reliable.


Maybe I'm just more comfortable following what everyone else is
doing - Who knows, if I do well at PICs I might even have a look at
the AVR.

I think you're mistaken to imagine everyone uses PICs. It's more of
a joke than reality AIUI.

You're just being anti-PIC. Do you really think there are more
people using 805x parts than PICs? Considering that you have little
experience in programming micros and aparently none with PICs, I'm
at a complete loss to understand why you want to ram PL/M and 805x
down everyones throat every time this stuff comes up. What is it
exactly that is so great about PL/M and so "Bleh" about C?

Isn't AVR what Atmel would like everyone to use instead of 805x parts?
Probably, it's their counterpart to the Microchip PIC. Atmel also makes ARM
processors. Of all the processors I've played with, I think the ARM has the
most beautiful architecture.
 

Welcome to EDABoard.com

Sponsor

Back
Top