Searching \ for '[PIC]:a newbie mpasm question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/begin.htm?key=asm
Search entire site for: 'a newbie mpasm question'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:a newbie mpasm question'
2001\05\04@083836 by sam woolf

flavicon
picon face
Hi everyone. Sorry if this is a silly question.

I have a subroutine called PULSE that oscilates one of the pins on the 16F84. It does this by using BCF and BSF to set and clear that pins bit on porta.. so basically there are some loops and instructions like BCF PORTA,1

My question is: how can I modify my subroutine so that I can set which pin to oscillate. I want to be able to do something like:

movlw     1; load w with number of pin on porta to pulse
call    ping; oscillate pin 1
movlw    2;now load in new pin number
call    ping ;    oscillate pin 2.

How can I do this? Are instructions like BCF porta,w valid? I've tried this and it doesn't seem to work. Any suggestions much appreciated.
sam.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@085123 by Bob Ammerman

picon face
Wonderful,

This is now three times in four days I think.

See the thread "bit adjustment" in the archives.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\05\04@091626 by Kevin Blain

flavicon
face
do we spot a pattern emerging -- a new school project could be out there??
----- Original Message -----
From: "Bob Ammerman" <spam_OUTRAMMERMANTakeThisOuTspamPRODIGY.NET>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Friday, May 04, 2001 1:43 PM
Subject: Re: [PIC]:a newbie mpasm question


{Quote hidden}

this
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@094348 by Olin Lathrop

face picon face
>>
My question is: how can I modify my subroutine so that I can set which pin
to oscillate. I want to be able to do something like:

movlw     1; load w with number of pin on porta to pulse
call    ping; oscillate pin 1
movlw    2;now load in new pin number
call    ping ;    oscillate pin 2.

How can I do this? Are instructions like BCF porta,w valid?
<<

No, the bit number in BCF and BSF are hard coded into the instruction, so you
can't do it that way.  You can set up a mask with the selected bit set to
one, then OR with the mask to enable the bit and AND with the inverted mask
to disable the bit.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, EraseMEolinspam_OUTspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@165228 by ?=
flavicon
face
   Check this out:

http://www.piclist.com/techref/microchip/math/bit/mask.htm

   Gonzalo

----- Mensaje original -----
De: "sam woolf" <samwspamspam_OUTCOGS.SUSX.AC.UK>
Para: <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU>
Enviado: Viernes, 04 de Mayo de 2001 07:35
Asunto: [PIC]:a newbie mpasm question


Hi everyone. Sorry if this is a silly question.

I have a subroutine called PULSE that oscilates one of the pins on the
16F84. It does this by using BCF and BSF to set and clear that pins bit on
porta.. so basically there are some loops and instructions like
BCF PORTA,1

My question is: how can I modify my subroutine so that I can set which pin
to oscillate. I want to be able to do something like:

movlw     1; load w with number of pin on porta to pulse
call    ping; oscillate pin 1
movlw    2;now load in new pin number
call    ping ;    oscillate pin 2.

How can I do this? Are instructions like BCF porta,w valid? I've tried this
and it doesn't seem to work.
Any suggestions much appreciated.
sam.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@182112 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

That instruction is not valid, the bit must be set at compile time.
One way of doing this is to use a lookup table to convert your bit number to
a mask

e.g.

GetMask:
       addwf PCL,f
       retlw B'00000001'
       retlw B'00000010'
       retlw B'00000100'
       retlw B'00001000'
       retlw B'00010000'
       retlw B'00100000'
       retlw B'01000000'
       retlw B'10000000'


Then use the returned bit mask to toggle the port:

movlw 1                         ; select pin to toggle
call GetMask            ; retrieve the appropriate mask
xorwf PORTA,f           ; toggle the pin

Everytime you XOR the port with the mask, the select bit will toggle.

Hope this helps.

Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@184634 by ?=

flavicon
face
   I get a litlle bit confuse with that, if you want to use it, you MUST be
sure that "GetMask" is in a PCL lower than 248... otherwise if PCL = 250,
and w = 7 after ADD PCL = 2. Am I wrong?

   Regards,

   Gonzalo

----- Mensaje original -----
De: "Michael Rigby-Jones" <spamBeGonemrjonesspamBeGonespamNORTELNETWORKS.COM>
Para: <TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU>
Enviado: Viernes, 04 de Mayo de 2001 08:00
Asunto: Re: [PIC]:a newbie mpasm question
| GetMask:
|         addwf PCL,f
|         retlw B'00000001'
|         retlw B'00000010'
|         retlw B'00000100'
|         retlw B'00001000'
|         retlw B'00010000'
|         retlw B'00100000'
|         retlw B'01000000'
|         retlw B'10000000'

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\04@190105 by jamesnewton

face picon face
It has to be less than 8. The value in W represents the bit number that the
mask is generated for...

0 = 00000001
1 = 00000010
2 = 00000100
3 = 00001000
...
7 = 10000000

see
http://www.piclist.com/techref/microchip/tables.htm

But a better solution is at
www.piclist.com/techref/microchip/math/bit/mask.htm
as I indicated earlier.

---
James Newton (PICList Admin #3)
RemoveMEjamesnewtonspamTakeThisOuTpiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2001\05\04@200302 by Drew Vassallo

picon face
>     I get a litlle bit confuse with that, if you want to use it, you MUST
>be
>sure that "GetMask" is in a PCL lower than 248... otherwise if PCL = 250,
>and w = 7 after ADD PCL = 2. Am I wrong?

Well, yes, in a way.  You can do it this way, or simply adjust the upper PCL
byte (PCLATH) before you move down the table.  Use "Index" as the line to
jump down to.

Big_Table
               movlw   HIGH (Table_Start)
               movwf   PCLATH
               movf    Index, 0
               addlw   LOW (Table_Start)
               skpnc
               incf    PCLATH, 1
               movwf   PCL
Table_Start
               retlw   0x01
               retlw   0x02
               etc...

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\07@013056 by Kari Lehikko

flavicon
face
A nice way to convert bit number to bit mask (taken from Microchip's
seminar notes...)

Bit number [0-7] to bitmask [00000001-10000000]
;Enter with bit number [0-7] in BITNUM. Exit with bit mask in W.
       movlw   0x01
       btfsc   BITNUM,1
       movlw   0x04
       movwf   temp
       btfsc   BITNUM,0
       addwf   temp
       btfsc   BITNUM,2
       swapf   temp
       movf    temp,w

I prefer this approach instead of using a table.

regards,

- Kari -

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@023104 by Kashif Ali

flavicon
face
hi all

I new user of pic microcontroller.

facing problem in lookup table using command

   lookup
           jmp    pc+w
           retw   00h,01h,02h,03h,04h
           retw   00h,05h,06h,07h,08h
           retw   00h,09h,02h,03h,04h
           retw    .........

this command "jmp pc+w" did not return with w on its location it return
but undefined location.

give solution of my problem or an practical example of lookup table for
128 bytes.

Kashif ali

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@060559 by Justin Fielding

flavicon
face
I have used:

lookup addwf   PCL,F
           retlw    b'11101011'
           retlw    b'00100001'
           retlw    b'11000111'
           ertc, etc,etc

HOpe this helps...


{Original Message removed}

2001\05\07@072149 by Kashif Ali

flavicon
face
I am using CVASM16 which is 8051 compatible instruction set for pic.
The instruction "jmp pc+w" is correct but the actual problem is "retw" which
have limitation of "256 word block"  I am caring of it but still have problem
of undefined return.

Kashif Ali


Justin Fielding wrote:

> I have used:
>
> lookup addwf   PCL,F
>             retlw    b'11101011'
>             retlw    b'00100001'
>             retlw    b'11000111'
>             ertc, etc,etc
>
> HOpe this helps...
>
> {Original Message removed}

2001\05\07@074647 by Justin Fielding

flavicon
face
Sorry, I only use real PIC ASM.

---- Original Message -----
From: "Kashif Ali" <mtl3EraseMEspam.....WOL.NET.PK>
To: <EraseMEPICLISTspamMITVMA.MIT.EDU>
Sent: Monday, May 07, 2001 12:21 PM
Subject: Re: [PIC]:a newbie mpasm question


> I am using CVASM16 which is 8051 compatible instruction set for pic.
> The instruction "jmp pc+w" is correct but the actual problem is "retw"
which
> have limitation of "256 word block"  I am caring of it but still have
problem
{Quote hidden}

> > {Original Message removed}

2001\05\07@082202 by Olin Lathrop

face picon face
>     lookup
>             jmp    pc+w

There is no such instruction.  How did you ever get this past the assembler?
You can do ADDWF PCL.

>             retw   00h,01h,02h,03h,04h

Again, how did you get this past the assembler?  The correct instruction is
RETLW.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, RemoveMEolinEraseMEspamEraseMEembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@083024 by Douglas Wood

picon face
He's using CVASM, not MPASM. That's how...

Douglas Wood
Software Engineer
RemoveMEdbwoodspam_OUTspamKILLspamkc.rr.com

Home of the EPICIS Development System for the PIC and SX
http://epicis.piclist.com

{Original Message removed}

2001\05\07@083437 by Bob Ammerman

picon face
Just a different assembler Olin. (Parallax?)

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\05\07@084913 by Drew Vassallo

picon face
>facing problem in lookup table using command
>
>     lookup
>             jmp    pc+w
>             retw   00h,01h,02h,03h,04h
>             retw   00h,05h,06h,07h,08h
>             retw   00h,09h,02h,03h,04h
>             retw    .........
>
>this command "jmp pc+w" did not return with w on its location it return
>but undefined location.

I'm not sure if this is the problem, but I believe you should be accessing
"PCL" not "PC".

Also, your "retw" commands are fine, except that if you want to make a data
table, you should use "dt" as a command (not sure if "DT" is CVASM
compatible, though).

Having an 8051 compatible assembler is fine, except that most people here
don't work with it, we mostly use Microchip's MPASM.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@105452 by sam woolf

flavicon
picon face
thankyou Michael, that works. Now a related question:
I have a subroutine called ECHO that listens for and times highs and lows on
one pin of the 16F84..
The original code uses BTFSS PORTA, PIN
I want to be able to set which pin to listen to from outside the subroutine.
I've tried to do a mask thing, but it doesn't work:
basically I replaced BTFSS PORTA, PIN
with:
PIN0    EQU    B'00000001'
PIN1    EQU    B'00000010'
;
MOVF        PIN0,W
XORWF      PORTA
BTFSS        STATUS,Z

 This doesn't seem to be working? Any idea why not? Is there anything else
I can try?
sam


----- Original Message -----
From: "Michael Rigby-Jones" <RemoveMEmrjonesTakeThisOuTspamspamNORTELNETWORKS.COM>
To: <EraseMEPICLISTspamspamspamBeGoneMITVMA.MIT.EDU>
Sent: Friday, May 04, 2001 2:00 PM
Subject: Re: [PIC]:a newbie mpasm question


> > {Original Message removed}

2001\05\07@122231 by David Cary

flavicon
face
Dear Kashif Ali,

Kashif Ali <RemoveMEmtl3KILLspamspamWOL.NET.PK> on 2001-05-07 06:21:33 AM
> The instruction "jmp pc+w" is correct but the actual problem is "retw" which
> have limitation of "256 word block"  I am caring of it but still have problem
> of undefined return.
...
> >             jmp    pc+w
> >             retw   00h,01h,02h,03h,04h

Have you looked at
 piclist.com/techref/microchip/tables.htm
 piclist.com/techref/microchip/bigtable.htm
?
The code there does not have the ``255 word limitation''.

Have you checked the assembled code (MPASM generates a ".lst" file) to make sure
this really assembles into a long series of retw instructions ?

--
David Cary

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@123228 by Mark Newland

flavicon
face
The MOVF command is NOT looking to take a literal number and move it into the W
register (like the MOVLW command does).  It is trying to take the value stored
in a memory location.  You have told it to take the value that is stored in
memory location PIN0.  Since memory location B'00000001' is really TMR0, I'm not
surprised it doesn't work. Try this instead:

MOVLW    PIN0

sam woolf wrote:

{Quote hidden}

> > > {Original Message removed}

2001\05\07@123440 by Olin Lathrop

face picon face
> PIN0    EQU    B'00000001'
> PIN1    EQU    B'00000010'
> ;
> MOVF        PIN0,W

You want the value of PIN0 into W, not the contents of the location at
address PIN0.  Use MOVLW PIN0.

> XORWF      PORTA

To avoid altering PORTA, you should append ", W".  This writes the result of
the XOR into W instead of PORTA.

> BTFSS        STATUS,Z


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolinspamBeGonespamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@125623 by David Cary

flavicon
face
Dear Sam Woolf,

sam woolf <EraseMEsamwspamEraseMECOGS.SUSX.AC.UK> on 2001-05-07 09:51:05 AM wrote:
> I have a subroutine called ECHO that listens for and times highs and lows on
> one pin of the 16F84..
> The original code uses BTFSS PORTA, PIN
> I want to be able to set which pin to listen to from outside the subroutine.
> I've tried to do a mask thing, but it doesn't work:
> basically I replaced BTFSS PORTA, PIN
> with:
> PIN0    EQU    B'00000001'
> PIN1    EQU    B'00000010'
> ;
> MOVF        PIN0,W
> XORWF      PORTA
> BTFSS        STATUS,Z
>
>  This doesn't seem to be working? Any idea why not? Is there anything else
>I can try?
>sam

Since this code needs to focus on just that one pin, you need to use AND to mask
off all the other pins.
Also, try using "movlw" to move (compile-time) ``literal'' constants to w;
try using "movfw" to move (run-time) variables to w.

 ; Warning: untested code
...
 movlw PIN0
 movwf current_pin
...
wait_for_lo:
 call increment_hi_time_counter
 movfw PORTA
 andwf current_pin,w
 skpz
 goto wait_for_lo
...
wait_for_hi:
 call increment_lo_time_counter
 movfw PORTA
 andwf current_pin,w
 skpnz
 goto wait_for_lo
...

Isn't there a timer/counter on your PIC ? Perhaps the software would be simpler
(and the timing more accurate) if you used that timer/counter on the PIC, and
added external mux hardware to switch the appropriate signal to the PIC's timer
pin.

Sounds like you're working on a little robot with sonar sensors.
I'd enjoy looking at a web page with the source code and a couple of small
photos.
(There's lots of "free" sites out there
 The 100 Best Free Web Space Providers Reviewed
 http://100best-free-web-space.com/Top100.htm
or you could talk James Newton into letting you put them on piclist.com).


--
David Cary

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@141300 by Bob Ammerman

picon face
----- Original Message -----
From: "sam woolf" <@spam@samw@spam@spamspam_OUTCOGS.SUSX.AC.UK>
To: <spamBeGonePICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: Monday, May 07, 2001 10:51 AM
Subject: Re: [PIC]:a newbie mpasm question


> thankyou Michael, that works. Now a related question:
> I have a subroutine called ECHO that listens for and times highs and lows
on
> one pin of the 16F84..
> The original code uses BTFSS PORTA, PIN
> I want to be able to set which pin to listen to from outside the
subroutine.
{Quote hidden}

else
> I can try?
> sam

   movf     PIN0,W
   andwf   PORTA,W
   skpz --or-- skpnz
>

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\07@141646 by Bob Ammerman

picon face
Olin, you got it wrong and so did I ....

sigh....

The correct snippet is:

   movlw    PIN0
   andwf    PIN0,W
   skpz ---or--- snpnz as needed

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\05\07@142257 by Bob Ammerman

picon face
And that's not it either...

   movlw    PIN0
   andwf    PORTB,W
   skpz ---or--- skpnz

(I think I'll try going back to bed and getting up on the other side).

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\05\07@150517 by Douglas Wood

picon face
"Also, try using "movlw" to move (compile-time) ``literal'' constants to w;
try using "movfw" to move (run-time) variables to w."

"MOVLW" does move a literal value into W at compile time; all PIC
instructions are run-time.

Douglas Wood
Software Engineer
.....dbwoodspam_OUTspamkc.rr.com

Home of the EPICIS Development System for the PIC and SX
http://epicis.piclist.com

{Original Message removed}

2001\05\07@163020 by jamesnewton

face picon face
You don't even have to talk to me...

the site will let you put the page, code, etc.. up by yourself... just email
me any pictures you want and I will post them manually.

---
James Newton (PICList Admin #3)
TakeThisOuTjamesnewton.....spamTakeThisOuTpiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2001\05\09@080954 by Kashif Ali

flavicon
face
Dear Lathrop,

Did you ever use 8051 or MCS51 based micro-controller. I am new user of pic
micro controller but I have an experience of 8051 micro controller the
instruction which you asked for is 8051 compatible. Techtools Pic Compiler give
this facility to pic user who has experience of 8051 uC. It was easy for me to
adopt it. If you have also experience of 8051 you can checkit out from
"http://www.tech-tools.com"

Kashif ali
Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\09@081222 by Kashif Ali

flavicon
face
Hi all

Is there any software engineer who is using tech-tools pic assembler "CVASM16"

if any body please contact me.

Kashif ali

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\09@120629 by Olin Lathrop

face picon face
> Did you ever use 8051 or MCS51 based micro-controller. I am new user of
pic
> micro controller but I have an experience of 8051 micro controller the
> instruction which you asked for is 8051 compatible. Techtools Pic Compiler
give
> this facility to pic user who has experience of 8051 uC. It was easy for
me to
> adopt it. If you have also experience of 8051 you can checkit out from
> "http://www.tech-tools.com"

Yes, I've programmed the 8051 family before.  It never occurred to me that
someone would want to program one processor family as if it were another.
You have to learn the instruction set anyway.  It seems a minor issue to
learn different mnemonics.  Besides, all the Microchip documentation and
support uses the official mnemonics.  My advice is that when you're on a
PIC, learn to speak PIC.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinspamRemoveMEembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\09@213600 by Alexandre Domingos F. Souza

flavicon
face
>Yes, I've programmed the 8051 family before.  It never occurred to me that
>someone would want to program one processor family as if it were another.
>You have to learn the instruction set anyway.  It seems a minor issue to
>learn different mnemonics.  Besides, all the Microchip documentation and
>support uses the official mnemonics.  My advice is that when you're on a
>PIC, learn to speak PIC.

       It's not just learn mnemonics, but learn an entire new system!!! In the mcs-51, I'd compare an entire byte and see if it was greater or smaller than x, but for doing this in the PIC...oh oh... :oPPP

       The thing is: PIC IS COMPLICATED LIKE HELL!!! But is a very powerful thing to learn. Hard to learn, hard to program, nice to use because its cheap.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\09@220551 by Jim Paul

picon face
I strongly disagree about PIC's being hard to program.
I think the PIC is the easiest thing to program, and I've
had my share of other processors to work with.  Such
as the 8080, Z80, 8748, 8051, 6800, 6502, 1802, 9900,
etc., etc.   Of all of these, the PIC is by far the easiest to
program.   I don't understand why you would think the PIC
is difficult to program.

You have a right to your opinion, but I don't agree with it.


                                                       Regards,

                                                           Jim




{Original Message removed}

2001\05\10@032757 by Kashif Ali

flavicon
face
Dear Jim Paul :

I think it is the meter of experience. As because I have not much experience of
pic micro controller but still my opinion for pic is hard to program. I am going
to differ both with these little examples :

   Pic micro controller has page boundaries limitation
   8051 has no page boundary limit.

   Pic has only 8 byte stack level
   8051 has upto 100 stack level (depend on data memory)

   Pic micro controller family has higher prices then 8051 compatible
   like Pic16f84 > AT2051 in price but in features Pic16f84 < AT2051

   I have seen only one big advantage in PIC is low power. That's why I am
working
   on it.

   It great for me if give your opinion.

>
> --
> http://www.piclist.com hint: The PICList is archived three different
> ways.  See http://www.piclist.com/#archives for details.
>
> --
> http://www.piclist.com hint: The PICList is archived three different
> ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@043028 by Kevin Blain

flavicon
face
>         It's not just learn mnemonics, but learn an entire new system!!!
In the mcs-51, I'd compare an entire byte and see if it was greater or
smaller than x, but for doing this in the PIC...oh oh... :oPPP

movf    byte,w    ; byte to look at into w
xorlw    x        ; compare it with literal x
skpz        ; skip over next instruction if result is zero (i.e. they are
the same)
goto    different    ; byte is different to x
goto    same    ; byte is same as x


>         The thing is: PIC IS COMPLICATED LIKE HELL!!! But is a very
powerful thing to learn. Hard to learn, hard to program, nice to use because
its cheap.

eh?

Regards, Kevin

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistserv@spam@spamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@062732 by dr. Imre Bartfai

flavicon
face
Hi,
here I am. Your question?

Regards,
Imre


On Wed, 9 May 2001, Kashif Ali wrote:

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@085206 by Patrik Husfloen

picon face
>         The thing is: PIC IS COMPLICATED LIKE HELL!!! But is a very powerful thing to learn. Hard to learn, hard to program, nice to use because its cheap.

I don't agree, sure I programmed before I started with PIC, but only VB & TCL, I have since then moved on to C/C++ etc..but that's not the point.
I found the PIC very easy to learn, with only 33 instructions, a great program like MPLAB at your disposal, the excellent specification sheet from MC, and the internet, what is so hard?
It's not very complicated either. I recomend reading the spec sheet, it's very helpful.
(too bad I only found this PIClist now, 2 years late or so :)

Regards,
Patrik

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@094621 by James Paul

flavicon
face
Kashif,

Regarding the PAGE BOUNDARY issue, I just keep it in mind when I
write code.   This I don't see as a problem.  Just something to
keep in mind.  I work around it.

Regarding the 8 stack level vs the 8051's 100 level stack.  I have
yet to usee 100 level's of stack at a time.  I have used up to 12
in one case, but they weren't all required at the same time, so no
problem there.   I guess if you have to use 100 levels of stack at
a time, then you're right, the PIC is not for that application.

Regarding the cost issue.   The PIC's might be a little higher in
cost at the outset, but I chalk that little extra cost up to the
cost of the development tools provided by Microchip otherwise free
of charge.   The 8051 on the other hand when I started working with
it, I had to pay a substantial amount of money for the dev tools.
So when the bottom line comes around, the actual cost of the part
and the cost of developing code for it is about the same.   Also,
the 8051 AFAIK comes in only a 40 or 44 pin package.  In some cases,
this is just too much.   A smaller package would be better.  Hence
the PIC family fits perfectly.  I'm willing to pay a bit more for a
more perfect fit.

Regarding the Low Power issue.  I agree 100%.   Another advantage
in my book is the fact that they are static devices.  They can run
at any speed form DC up to their design maximum.  The 8051 isn't a
static device that I know of.  If I'm not correct in thinking this,
I apologize.  The only other static processor that I can think of
right off hand that I've had any experience with is the 1802 by RCA.

I realize that PIC's aren't for every application,  but for most
of the things I work on, they are absolutely perfect.
And, at work, I integrated the PIC's into three different projects.
So if a manufacturer thinks they have the right price/performance
ratio, who am I to argue?  Another thing that sold them on the
integration of one of the parts was the 8 pin SOIC package.  It got
the job done, while taking up almost no room. (<.25 sq in).

So there you have my thoughts on why I prefer PIC's over other
microcontrollers.


                                          Regards,

                                            Jim




On Thu, 10 May 2001, Kashif Ali wrote:

{Quote hidden}

@spam@jimRemoveMEspamEraseMEjpes.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@100845 by Olin Lathrop

face picon face
> The thing is: PIC IS COMPLICATED LIKE HELL!!! But is a
> very powerful thing to learn. Hard to learn, hard to
> program, nice to use because its cheap.

I think of the PICs as among the simplest machines I've programmed (and I've
programmed quite a few).  If you want to see complicated, take a look a the
Pentium's instruction set.  In my opinion, that's the most complicated
machine I've ever programmed in assembler.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, @spam@olinspam_OUTspam.....embedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservEraseMEspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@100849 by Olin Lathrop

face picon face
>     Pic micro controller has page boundaries limitation
>     8051 has no page boundary limit.
>
>     Pic has only 8 byte stack level
>     8051 has upto 100 stack level (depend on data memory)
>
>     Pic micro controller family has higher prices then 8051 compatible
>     like Pic16f84 > AT2051 in price but in features Pic16f84 < AT2051

You should compare processing power for the price.  The PIC's harvard
architecture usually provides more crunching power, all else being equal.
The 8051's Von Neuman architecture provides more flexibility.  A big plus
for PICs is that the development tools are free and supported by the same
company that makes the chips.  I did a project with a 80C152 a few years
ago.  The chip was from Intel, the support from the local distributor, the
compiler from Franklin (Keil), and the ICE from yet another party.  The
Franklin and ICE people were always pointing fingers at each other instead
of getting my problem fixed.  What a pain!

>     I have seen only one big advantage in PIC is low power. That's why I
am
> working
>     on it.

If power is the overriding concearn, check out the new microcontrollers from
TI.  I don't remember the exact name, something like TMS320?  I haven't
tried these yet, but the power consuption specs are very impressive.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspamBeGonespamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistserv@spam@spamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@110908 by Jeff DeMaagd

flavicon
face
----- Original Message -----
From: Kashif Ali <.....mtl3@spam@spamEraseMEWOL.NET.PK>

> I think it is the meter of experience. As because I have not much
experience of
> pic micro controller but still my opinion for pic is hard to program. I am
going
> to differ both with these little examples :
>
>     Pic micro controller has page boundaries limitation
>     8051 has no page boundary limit.
>
>     Pic has only 8 byte stack level
>     8051 has upto 100 stack level (depend on data memory)

Neither has been a real issue for me.  I tend to modularize my code a lot
and even then I haven't had troubles with an 8 level stack.  Also, the stack
size is somewhat dependent on model.

>     Pic micro controller family has higher prices then 8051 compatible
>     like Pic16f84 > AT2051 in price but in features Pic16f84 < AT2051

The 16F84 has flash capabilities.  Does the AT2051?  If not, compare the
price with a 16C84.  I think that cuts the price by at least a half for the
OTP versions.  I am unfamiliar with the plethora of 8051 clones, do some
have internal EPROM capabilities?  I think that the price differenctials
will vary from country to country, this may be part of the issue.

>     I have seen only one big advantage in PIC is low power. That's why I
am
> working on it.

That's why I started using PICs.  I was able to take advantage of the 8 pin
chips nicely as well.  I don't think there is an 8051 equivalent for those,
is there?

Jeff
demaagd.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservRemoveMEspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@115208 by James Paul

flavicon
face
All,

FYI, TI's Microcontroller lineup consists of three main product
lines.  The 8 bit machines are the 370 line, The 16 bit machines
are the PRISIM line, and the 32 bit are the ARM line (470 series).

The 320 part spoken of here is the DSP line of parts.

Hope this helps.


                                          Regards,

                                            Jim



On Thu, 10 May 2001, Olin Lathrop wrote:

{Quote hidden}

RemoveMEjimspamspamBeGonejpes.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@130751 by Alexandre Domingos F. Souza

flavicon
face
>>         It's not just learn mnemonics, but learn an entire new system!!!
>In the mcs-51, I'd compare an entire byte and see if it was greater or
>smaller than x, but for doing this in the PIC...oh oh... :oPPP
>movf    byte,w    ; byte to look at into w
>xorlw    x        ; compare it with literal x
>skpz        ; skip over next instruction if result is zero (i.e. they are
>the same)
>goto    different    ; byte is different to x
>goto    same    ; byte is same as x

       Living and learning... :o) (in the prettiest shade of red)

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@135304 by Drew Vassallo

picon face
> >>         It's not just learn mnemonics, but learn an entire new
>system!!!
> >In the mcs-51, I'd compare an entire byte and see if it was greater or
> >smaller than x, but for doing this in the PIC...oh oh... :oPPP
> >movf    byte,w    ; byte to look at into w
> >xorlw    x        ; compare it with literal x
> >skpz        ; skip over next instruction if result is zero (i.e. they are
> >the same)
> >goto    different    ; byte is different to x
> >goto    same    ; byte is same as x

This wouldn't tell you if it were "greater or smaller than x".  To do that:

movf byte, W
sublw x
skpnz  ; btfsc STATUS, Z
goto equal  ; x = byte
skpnc  ; btfsc STATUS, C
goto x_gt_byte  ; x > byte
goto x_lt_byte  ; x < byte

I don't like using these mnemonics, though.  I don't have an explanation why
:)  Just like to use the raw command so that I know exactly what's being
done, I guess.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistserv@spam@spammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\10@161155 by Bill Westfield

face picon face
    FYI, TI's Microcontroller lineup consists of three main product
    lines.  The 8 bit machines are the 370 line, The 16 bit machines
    are the PRISIM line, and the 32 bit are the ARM line (470 series).

    The 320 part spoken of here is the DSP line of parts.

According to a TI person at last years Embedded Systems Conference, the 370
series (8 bit processors) are being de-emphasized ("except for automotive
applications) in favor of the MSP430 processors (and these are the "very-low
power consumption" processors.)

TI also has a couple rather extensive lines of DSP processors, and one
of the claims to fame of one of the lines is "most mips per watt" - ie
significantly lower power consumption than competitive produces (but I
think nowhere near the MSP430 line...)

I'm a bit surprised that some DSP lines aren't seeing more use as
general purpose embedded processors - they're starting to hit the right
sort of price points (<$10) and tend to have very impressive performance
characteristics...

BillW

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseMEspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\05\11@053353 by Kashif Ali

flavicon
face
Thank you for your reply.

I am working first time with pic micro controller in past I have an experience of
MCS51 compatible micro controllers. So I decide to adopt a instruction set for PIC
which compatible of mcs51 and found Techtools.

Now I'm facing problems of
                                           i)    Paging
                                           ii)    Retw
                                           iii)    etc.. etc..
which was not exist in mcs51 base program

Please also tell where your from


Kashif Ali
Pakistan - Lahore

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspam_OUTspamRemoveMEmitvma.mit.edu


2001\05\11@053400 by Peter L. Peres

picon face
> The thing is: PIC IS COMPLICATED LIKE HELL!!! But is a very powerful
> thing to learn. Hard to learn, hard to program, nice to use because
> its cheap.

I do not aggree. Among the small processors, the PIC occupies a special
place due to its simplicity. Especially compared to 8051 etc.

Peter

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspamRemoveMEmitvma.mit.edu


2001\05\11@070051 by Kashif Ali

flavicon
face
Dear Mr. Olin Lathrop,

What is simplicity in Pic I don't agree with you.
You didn't find fully support from intel I don't think so because in my case I
found them very good and also with Atmel and ISSI.

Can you give the brief detail about low power microcontroller of TI ?


Kashif Ali

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspam@spam@mitvma.mit.edu


2001\05\11@070850 by Kashif Ali

flavicon
face
Please tell what is simple thing in pic if compare the 8051.

Kashif ali

Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspam@spam@mitvma.mit.edu


2001\05\11@073746 by Olin Lathrop

face picon face
> Can you give the brief detail about low power microcontroller of TI ?

No, but I'm sure the TI web site can.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, RemoveMEolinspam_OUTspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspammitvma.mit.edu


2001\05\11@093202 by James Paul

flavicon
face
Kashef,

I live in Houston, Texas.  Texas is in the middle southern United
States, and Houston is in the southeast portion of the state near
the Gulf Of Mexico.

                                               Regards,

                                               Jim Paul




On Fri, 11 May 2001, Kashif Ali wrote:

{Quote hidden}

jimspam_OUTspamjpes.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\05\11@093613 by Kashif Ali

flavicon
face
Dear mr. Olin Lathrop :

What is your source of Pic uC ?

I need it, can you give the source except digikey

Kashif ali

Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\05\11@100910 by Kashif Ali

flavicon
face
Thanks for your reply.

How many projects you did with the help of tech-tools assembler.

and which uC you used for your projects.

Kashif ali


James Paul wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamBeGonespamRemoveMEmitvma.mit.edu


2001\05\11@102955 by Kevin Blain

flavicon
face
You seem to be having difficulty with the following....

a) understanding the PIC (architecture, mnemonics etc.) as you are more
familiar with 8051 type micros
b) sourcing PICs

This really begs the question....Why are you trying to use PICs???

{Original Message removed}

2001\05\11@103409 by James Paul

flavicon
face
Kashif,

I have not used tech-tools at all.   I use either PIC Assembly
language and MPLAB supplied by Microchip, or CCS 'C' that I
bought from CCS.   As far as parts I've used, I have either used or
worked with the following parts.

16C84, 16F84, 12C672, 12C509, 16C71, 16C54, 16C55, 16C56, 16C57,
16C76, 17C42

So as you can see, I have at one time or another worked with a good
portion of the line of PIC's, except the new 18C series.
I work with a guy who has worked with them, but I haven't yet.

I truly believe that once you start working with the PIC controllers,
and get to know them, you too will concur that they are among the
easiest to program, and are fast.  A lot of bang for the buck.
And apparently many other people think so too, cause when I first
started working with PIC's in early 1990's, they had just a few
devices to choose from (16C55, 56, 57, & 58 and the 16C84).
Now look at the lineup.  So many parts, it's hard to decide just
which one to use.  So, if people didn't think they were great and
was buying them, do you think Microchip would have expanded the
line they produce?   I would say probably not.


                                              Regards,

                                                Jim




On Fri, 11 May 2001, Kashif Ali wrote:

{Quote hidden}

spam_OUTjimSTOPspamspamjpes.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamspammitvma.mit.edu


2001\05\11@113207 by Bill Westfield

face picon face
Some time ago, TI's new flash MSP430F1101 processor ($0.99 at 10k) was
mentioned here as a potential competitor of PICs.  Since TI and Wyle were
running one of those "bargin" seminars ($49 gets you the seminar, plus
breakfast, lunch, and cookies, plus more than $49 worth of evaluation
system), I thought I'd go, especially since that seemed to be the easiest
way to get the new evaluation kit.  In San Jose, this seminar was yesterday,
and I thought I'd share my impressions...

On the "oops" side, the seminar did NOT supply the flash evaluation kit
(MSP-FET430x110)  Apparently these are in high demand, as well as being
rather 'minimal' for demonstration/lab purposes.  Instead, the seminar
was done using the ($99) MSPSTK430B320 "starter kit."  This is a nicer
and more valuble set using one of the higher-end MSP430 chips and including
an LCD display, but the chip is not removable and not flash, and not all
that cheap if you wanted to buy them (~ $8)  We also got a coupon for 50%
off any other evaluation kit, so I'm not complaining very much...


Interesting things about the MSP430 series of processors.

1) Power consumption

The MSP430s are billed as "very low power consumption" chips.  They
typically run FULL speed at 400uA or lower, and have FIVE (5!) different
power-down mode for even lower consumption (two at 50uA, one at 1.5uA, one
at 0.1uA.)  The starter kit we got ran off power from the rs232 port.  The
parts generally run down to 2.2V or lower (the new low-end flash parts are
2.2V -> 3.6V parts.)


2) 16 bit ALU/Architecture

The MSP430 is a "true" 16 bit architecture, rather similar to a PDP11 in
some ways.  There is a 16 ALU and the instructions are nominally 16 bits
(plus additional words for immediate addresses and data and such.)  There
are 16 registers, which includes Stack pointer, Program Counter, Status
register, and "constant generator."  (12 general purpose registers are
left.)  There's a regular instruction set with 4 addressing modes and 27
basic opcodes.  (TI claims 7 addressing modes for source operands, but four
of those are really special cases of a single bit pattern.)

The constant generators are sort of neat.  They "occupy" one full register
position, and partly overlap the status register.  When used as a source
operand, they provide several common constants (0, -1, 1, 2, 4, 8),
depending on the addressing mode it was accessed with.  (and since it
doesn't really make any send to use the status register as an index
register, you don't lose any real functionality, either.)

By combining the 27 opcodes with the constant generator, TI implements what
it calls "emulated" instructions.  These are still a single word in length
(and execute in one cycle if the destination is a register), but they're not
really separate instuctions.  For example, "inc dest" (increment) is just
implemented as "add #1, dest", using the constant register to get the #1.
(The same sort of thing is what gets you the "extra" three addressing modes
from 2 bits in the instruction - indexed addressing using the PC gets you
"symbolic" mode, indexed addressing using "constant 0" gets you "absolute"
addressing, and register-indirect with autoincrement on the PC gets you
"immediate" addressing.)  Clever; but perhaps presenting it this way was
more confusing than otherwise...


3) Von Neuman architecture.

Unlike most low-end microcontrollers, the MSP430 uses the same address space
for instructions, data, and IO.  The labs all worked by downloading the
sample code into the RAM of the starter kit processor (it has 512 bytes.)
This has advantages and disadvantages, of course.  It DOES mean that the OTP
starter kit is more useful than it might be otherwise - small programs will
easilly fit in the RAM.  Instuctions are up to 6 bytes long and take up to 6
clock cycles, depending on addressing modes.  Register to Register
instructions all take only one cycle.


4) Clock generator.

The clock generator is just WEIRD.  I guess most of it's oddness stems from
the low power characteristics.  One of the goals is to be able to exit the
low power modes within 6us of an appropriate event, which is MUCH quicker
than some other microcontrollers can restart their clock.  All of the MSP430
chips are designed to operate with an external low-frequency (32.769kHz)
crystal (ACLK), and they all have an internal RC based clock with digital
control (MCLK.)  In the high end parts, the MCLK is locked to the ACLK using
something TI calls a "Frequency Locked Loop", and you simply set the desired
multiplier for the 32kHz that you want the system to run at (the default is
about 1MHz, highest supported speed is about 4MHz.)  In the low end parts,
the FLL is missing, so you deal with either a less accurate clock, or
implement something similar to the FLL in software.  In either case, the
peripherals operate off of the (more stable) ACLK.  (actually, the crystal
CAN be omitted entirely...)  One of the interesting (IMHO) side effects of
this is that the main CPU clock (MCLK) is NOT a perfect square wave.  It can
have assorted amounts of jitter, and for frequencies that are not
power-of-two multiples (or something like that) of the ACLK, it's derived
from multiple "taps" of counters, so it doesn't look much like an unstable
square wave either.  This can have implications if you need to write code
that is self timing down to the single cycle level - not all your cycles are
the same length!

The various low power modes of the 430 consist of being able to turn off
assorted combinations of the CPU itself, the MCLK, and the ACLK.  The most
popular LPM3 (1.5uA) turns off CPU and MCLK, but leaves the peripherals
running on the ACLK.  I *think* the fast turn-on time results from being
able to return to the RC-based clock before the crystal resumes oscillating,
and resuming the FLL tracking of frquency "later", after the crystal resumes
oscillating.  The bits controlling the low power modes are part of the CPU
status word, which means that they get pushed on the stack when an interrupt
takes the part out of LP mode, and restored (back to LP mode) when you
return from the interrupt.  (If you don't want to go back to LPM when you
return from the interrupt, you get to modify the status bits on the stack.)


5) Peripherals.

The MSP430s come with approximately the usual set of peripherals, with a
couple interesting exceptions.  The high end part include an LCD controller
that can directly drive and LCD (ie glass) display, using only (I think) a
few external resistors to generate appropriate voltages.  I'm not terribly
familliar with LCDs, but it looked pretty simple to me.  The timer on the
low end chips ("Timer-A") seemed to be quite a bit more versatile than the
usual low-end timer.  It has several counting modes (ie up/down and zero to
<setting> continuously) and some capture/compare registers.  TI's app notes
include info on using the timer (together with some software) to implement
A/D converters, UARTs, several types of PWM, and other stuff.  More
cleverness.  (Note that some of these applications probably REQUIRE use of
the timer rather than SW delays, due to the cpu clock inconstantcy...)  The
ever-present WDT is reprogrammable as an interval timer (causing an
interrupt rather than a reset), and the external reset pin can be
reprogrammed as a non-maskable interrupt.


Annoyances:

Aside from the clock jitter issues I've already mentioned, I think the chief
annoyance of the MSP430 is the low drive capability of the digital IO pins
(only 4.5mA for the low end parts at 3.6V.)

Also, TI's "user manual" really sucks.  I read over this prior to the
seminar, and found it to frequently be in the "wrong" order.  Sections would
constantly use terms that hadn't been defined yet, leading to quite a lot of
confusion.  I *think* this might be due to the intended audience being the
low-power engineer, but I (as primarilly a SW person) found it really
disorienting.  Some of this carried over into the seminar itself, but it was
mitigated by the interactive nature of things - there were some latter
sections scheduled in the seminar that had been mostly covered (by Q&A) by
the time we reached that point in the seminar.

There's no 40 pin part.  Aside from the small 20 pin parts, the chips tend
to end up in amateur-unfriendly packages (48 pin SOP, 64 QFP, etc.)


In all, it's a pretty neat set of parts.  While marketed as an extremely low
power part, there isn't really anything so odd about the part to eliminate
its use in more general purpose applications.  I hope the low end flash
parts end up with some "hobbyist" availability...

BillW

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestspamspamRemoveMEmitvma.mit.edu


2001\05\11@132304 by Roman Black

flavicon
face
James Paul wrote:

>  I truly believe that once you start working with the PIC controllers,
>  and get to know them, you too will concur that they are among the
>  easiest to program, and are fast.  A lot of bang for the buck.
>  And apparently many other people think so too, cause when I first
>  started working with PIC's in early 1990's, they had just a few
>  devices to choose from (16C55, 56, 57, & 58 and the 16C84).
>  Now look at the lineup.  So many parts, it's hard to decide just
>  which one to use.  So, if people didn't think they were great and
>  was buying them, do you think Microchip would have expanded the
>  line they produce?   I would say probably not.

Acutally for our last product I got the Motorola
IDE software (free) and designed most of the project
using that. I think it is better and nicer than MPLAB,
but not by much. I had it pretty much finished, even
with never buying a Motorola chip.

However, when the motorola chips turned up to be VERY
hard to get and as a small manufacturer I was treated
like dirt, I changed the whole project to the PIC and
had to learn PIC RISC coding. Actually very rewarding
when you get the hang of those darn spaghetti btfsx
instructions you can get a lot done in very few bytes.
That project shrunk by the time I had translated it.

We deal with Arrow and I have only nice things to say
about them, the PICs we use are always getting cheaper
and it's perfect as a small manufacturer to have a
sales rep that DOES get back to you with pricing and
other info. And you feel like your order is appreciated
even though it might be only $1000 (or even $500) here
and there.

I won't use other chips now, if there are any embedded
apps we need to design the PICs are first choice. Some
features seem very complex to the beginner, like the
IO options on the larger PICs (like the 16F877 etc),
but the actual PIC cpu itself is very simple and once
you master one PIC it gets easy from there. :o)
-Roman

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestspamspamspam_OUTmitvma.mit.edu


2001\05\11@150705 by Olin Lathrop

face picon face
> What is your source of Pic uC ?
>
> I need it, can you give the source except digikey

Lots of folks carry PICs.  I usually get them from DigiKey when I get them
myself.  Most of the time someone else does the purchasing and gives me a
few for the development.  Ask any local electronics distributor.  Most
likely they will either carry PICs or know who does in your area.  Around
here, Arrow also stocks the complete line of PICs.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinRemoveMEspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestSTOPspamspamRemoveMEmitvma.mit.edu


2001\05\11@150714 by Olin Lathrop

face picon face
> Some time ago, TI's new flash MSP430F1101 processor ($0.99 at 10k) was
> mentioned here as a potential competitor of PICs.  Since TI and Wyle were
> running one of those "bargin" seminars ($49 gets you the seminar, plus
> breakfast, lunch, and cookies, plus more than $49 worth of evaluation
> system), I thought I'd go, especially since that seemed to be the easiest
> way to get the new evaluation kit.  In San Jose, this seminar was
yesterday,
> and I thought I'd share my impressions...

Thanks, Bill.  I appreciate the time you took to write this up.  Very
interesting.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spam_OUTolinRemoveMEspamEraseMEembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestRemoveMEspam@spam@mitvma.mit.edu


2001\05\12@023544 by Kashif Ali

flavicon
face
I am just want to know what is pic uC I am not trying to say that picis not a
good thing.

Please don't mind just explain my question for my knowledge.

Because I have an experience of 8051, I tried to compare it. So I am clearing my
confusions in your answers.

Again please never mind.

Kashif ali


Kevin Blain wrote:

> You seem to be having difficulty with the following....
>
> a) understanding the PIC (architecture, mnemonics etc.) as you are more
> familiar with 8051 type micros
> b) sourcing PICs
>
> This really begs the question....Why are you trying to use PICs???
>
> {Original Message removed}

2001\05\12@031009 by Kashif Ali

flavicon
face
Dear James Paul,

Thanks for your reply.

I am working on pic 16f84, 16c64, 16c74 facing problems but finding also solution step by
step slowly. I got also major problem of uC, I have only One peace each 64, 74 that was
sample. There is source of pic in Pakistan.

Kashif ali


James Paul wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\12@034953 by Kashif Ali

flavicon
face
I have no source around me. I live in Pakistan

Please give a list of source if your can


Kashif Ali


Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\05\18@091358 by Kashif Ali

flavicon
face
i don't know how to use indirect address in pic16f84.
any one can send me an example of indirect addressing routine.

kashif ali

Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\18@101249 by michael brown

flavicon
face
----- Original Message -----
From: "Kashif Ali" <spamBeGonemtl3KILLspamspamTakeThisOuTWOL.NET.PK>
To: <EraseMEPICLIST.....spamKILLspamMITVMA.MIT.EDU>
Sent: Friday, May 18, 2001 8:13 AM
Subject: Re: [PIC]:a newbie mpasm question


> i don't know how to use indirect address in pic16f84.
> any one can send me an example of indirect addressing routine.
>
> kashif ali

Here is some sample code to move 8 bytes using indirect addressing.  To
obtain the address of a variable you would use a MOVLW instruction.  For
example, to move 8 bytes from "HERE" to "THERE" you could use the following
sequence:

           <code leading up to here>
           MOVLW      HERE                 ;obtain address of 'HERE'
           MOVWF      SOURCE           ;store into source pointer
           MOVLW      THERE               ;obtain address of 'THERE'
           MOVWF      DEST                 ;store into destination pointer
           CALL           Block_Move       ;move the data
           <more code>
;---------------------------------------------------------------------
;Block_Move -- Move 8 Bytes from SOURCE to DEST
;  Entry:
;        SOURCE should be pointing at place to move from
;        DEST should be pointing at destination place to store block
;  Exit:
;        SOURCE ,DEST, TEMP0, TEMP1, FSR will be destroyed. However,
;         the data will be moved ;-D
;---------------------------------------------------------------------
Block_Move
             movlw      d'8'                 ;Number of bytes to move
             movwf      TEMP0

_move_lp
             movf       SOURCE,W          ;Set up source pointer
             movwf      FSR
             movf      INDF,W            ;get the byte
             movwf      TEMP1           ; and save it

             movf      DEST,W            ;Set up destination pointer
             movwf      FSR
             movf      TEMP1,W           ;pick up saved byte
             movwf      INDF            ; and store it (now it is moved to
destination)

             incf       SOURCE, F       ;increment pointers to point to
next byte
             incf       DEST, F
             decfsz     TEMP0, F       ;see if we have moved all the bytes
              goto      _move_lp
             return

Hope this helps.

Michael Brown
Instant Net Solutions
http://www.KillerPCs.net

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\18@120618 by Olin Lathrop

face picon face
> i don't know how to use indirect address in pic16f84.
> any one can send me an example of indirect addressing routine.

Open the data sheet and read about the FSR and INDF registers.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spamolinspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\19@023932 by Kashif Ali

flavicon
face
thank you olin.

please tell me one more thing about external interrupt in pic16c64.

Kashif ali


Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\19@030605 by Quentin

flavicon
face
Kashif, again, read the Data sheet. Also get the Midrange MCU Family
Reference Manual (web, cdrom, printed book).
Will give you more detail than the data sheets.

Quentin

Kashif Ali wrote:
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\05\19@120717 by Olin Lathrop

face picon face
> please tell me one more thing about external interrupt in pic16c64.

I don't know how to answer this question.  Which "one more thing" are you
referring to?  What specifically are you asking?  The discussion of
interrupts is buried in the "Special Features of the CPU" chapter of the
manual.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinSTOPspamspamKILLspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...