Searching \ for 'Help for PIC beginners!' 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=pic
Search entire site for: 'Help for PIC beginners!'.

Truncated match.
PICList Thread
'Help for PIC beginners!'
1997\05\20@143639 by David Dobbs

flavicon
face
Hi,
       We have just started using the PIC 16C84 but at the moment we are
unable to get much sense out of the software. Although it compiles and
programs the switch and lamp circuit does not work.

1)On assembly we get the following messages:

       Message[302] F:\PIC\PROJECTS\TEST\TEST.ASM 16 : Register in operand
not in bank 0.  Ensure that bank bits are correct.
       Message[302] F:\PIC\PROJECTS\TEST\TEST.ASM 22 : Register in operand
not in bank 0.  Ensure that bank bits are correct.

2)We don't seem to be able to input to porta.

Listing:

       ;***********************INCLUDES************************

       INCLUDE P16C84.INC

;***********************EQUATES*************************

BUT     EQU     1
LED     EQU     1

;***********************THE PROGRAM*********************

       ORG     00

INIT    BSF     STATUS,RP0      ;Set up page 1 of registers.
       MOVLW   B'11111'
       MOVWF   TRISA           ;Sets porta as an input port.

       CLRF    PORTA           ;Clear porta.
       CLRF    PORTB           ;Clear portb.

       MOVLW   B'00000000'
       MOVWF   TRISB           ;Sets portb as an output port.
       BCF     STATUS,RP0      ;Resets page 0 of registers.

MAIN    BTFSS   PORTA,BUT
       GOTO    MAIN            ;Test porta,bit1 until it is set.

       BSF     PORTB,LED       ;Set portb,bit1 until it is set.

OFF     BTFSC   PORTA,BUT
       GOTO    OFF             ;Test porta,bit1 until it is clear.

       BCF     PORTB,LED       ;Clear portb,bit1.

       GOTO    MAIN

       GOTO    INIT

       END

We are using the standard equates from MPS.
               ////////////////////////////////////////////////////////////////
///
               Just to let you know we have a web page at
                     ' http://www.innotts.co.uk/~dobbs/ '
               ////////////////////////////////////////////////////////////////
///

1997\05\20@145752 by David Warman

flavicon
face
In message <spam_OUT199705201824.TAA09374TakeThisOuTspamcarlton.innotts.co.uk>, David Dobbs writes:
>Hi,
>        We have just started using the PIC 16C84 but at the moment we are
>unable to get much sense out of the software. Although it compiles and
>programs the switch and lamp circuit does not work.

>1)On assembly we get the following messages:
>
>        Message[302] F:\PIC\PROJECTS\TEST\TEST.ASM 16 : Register in operand
>not in bank 0.  Ensure that bank bits are correct.

This is to warn you that TRISA is in Bank 1.  If it annoys you, you
can mask off the warning with something like:

NOBANK  equ     07fh

       BSF     STATUS,RP0
       MOVWF   TRISA &NOBANK   ; Configure port

(One of many ways to handle this situation. YMMV)

>2)We don't seem to be able to input to porta.
>
>Listing:
>
>INIT    BSF     STATUS,RP0      ;Set up page 1 of registers.
>        MOVLW   B'11111'
>        MOVWF   TRISA           ;Sets porta as an input port.
>
>        CLRF    PORTA           ;Clear porta.

Here is the problem: you need to go back to Bank 0 to access
PORTA.  TRISA and PORTA are in the same place in alternate
banks, so this instruction is actually clearing *TRISA*.
Hence all pins get set to output!  Move the CLRF to after the
BCF STATUS,RP0 (or before the BSF), and all should be well.

Regards,

David.

1997\05\20@150749 by Andrew Warren

face
flavicon
face
David Dobbs <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> We have just started using the PIC 16C84 but at the moment we are
> unable to get much sense out of the software. Although it compiles
> and programs the switch and lamp circuit does not work.
>
> 1)On assembly we get the following messages:
>
>         Message[302] F:\PIC\PROJECTS\TEST\TEST.ASM 16 : Register in
>         operand not in bank 0.  Ensure that bank bits are correct.
>         Message[302] F:\PIC\PROJECTS\TEST\TEST.ASM 22 : Register in
>         operand not in bank 0.  Ensure that bank bits are correct.
>
> 2)We don't seem to be able to input to porta.

David:

Your code will work with the following changes.

OLD CODE:
---------

{Quote hidden}

NEW CODE:
---------

           ORG     00

           GOTO    INIT

           ORG     04

           RETFIE

   INIT    BSF     STATUS,RP0
           MOVLW   B'11111'
           MOVWF   TRISA^080H
           MOVLW   B'00000000'
           MOVWF   TRISB^080H
           BCF     STATUS,RP0

           CLRF    PORTA
           CLRF    PORTB

   MAIN    ....

The GOTO at location 0 and the RETFIE at location 4 aren't STRICTLY
necessary, but they'll prevent any accidental interrupt problems.

The "^080H"'s will fix the assembler warnings.

The instruction re-ordering is necessary because TRISA and TRISB are
on register page 1, while PORTA and PORTB are on register page 0.

When you program your PICs, remember to disable the Watchdog Timer.

-Andy

=== Andrew Warren - fastfwdspamKILLspamix.netcom.com
=== Fast Forward Engineering, Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\05\20@202834 by TONY NIXON 54964

flavicon
picon face
At the moment I am writing a windows based program that simulates the
PIC16C84. The software is intended for beginers to PICs, more so for
students who may be interested in learning to program. It
graphically displays how the chip functions, and can run code that
you write yourself. There are also modules that can be connected
such as a 7 segment display, to see how the ports work.

The software still has a way to go but if any one would like to try
it I can make a copy available. Some feedback would be welcome.

Tony


Just when I thought I knew it all,
I learned that I didn't.

1997\05\21@032031 by efoc

flavicon
face
TONY NIXON 54964 wrote:
>
> At the moment I am writing a windows based program that simulates the
> PIC16C84. The software is intended for beginers to PICs, more so for
> students who may be interested in learning to program. It
> graphically displays how the chip functions, and can run code that
> you write yourself. There are also modules that can be connected
> such as a 7 segment display, to see how the ports work.
>
> The software still has a way to go but if any one would like to try
> it I can make a copy available. Some feedback would be welcome.
>
> Tony
>
> Just when I thought I knew it all,
> I learned that I didn't.

Tony, I'd be glad to try your software out. My children are just getting
into electronics and this would be a GREAT learning aid for them at the
same time saving my box of bits from destruction by them :)). Thanks in
advance.


Cheers Peter ..........

Mailto:.....efocKILLspamspam.....cyberstop.net
+=================================+
| Listen to the Nothing, child,   |
| Listen to the Don'ts            |
| Listen to the Never Haves       |
| The Shouldn'ts, and the Won'ts  |
|                                 |
| Listen to Impossible            |
| then listen close to me:        |
|                                 |
| Anything can happen, child,     |
| ANYTHING can be.                |
|                                 |
| Poem by Sal Silverstein         |
+=================================+

1997\05\21@041324 by Eric Martens

flavicon
face
---------
{Quote hidden}

I would really like to try it. I'm completly new to PIC programming. I've
done programming for the motorola 680X0 familie. this would be a great way
to learn the PIC.

Greetings Eric.

**************************
*  Eric Martens          *
*  @spam@emarKILLspamspamknoware.nl  *
**************************

1997\05\21@080739 by chris

flavicon
face
{Quote hidden}

Peter,

You might want to download CESSIM84 from our web page.  It is a
free windows-based PIC16C84 simulator that you can also use as an
editor and assembler.  You can find a link to download it at:
http://www.itutech.com/cessim.htm

Chris
----------------------------------------------------------------------
Chris B. Sakkas (KILLspamchrisKILLspamspamitutech.com)  http://www.itutech.com
ITU Technologies (RemoveMEinfoTakeThisOuTspamitutech.com)    ftp://itutech.com
*** PIC Development tools, Caller ID solutions and more!           ***
*** VISA and MasterCard accepted     (513) 661-7523                ***

1997\05\21@150250 by Tim Kerby

picon face
Hi
Have you seen UMPS by Philippe TECHER <spamBeGonep.techerspamBeGonespamIDLS.IZARBEL.TM.FR> in
France.  It does just what your program will.  I would like a copy of your
software as I can't afford UMPS!

Tim

At 08:58 21/05/97 +1000, you wrote:
{Quote hidden}

------------------------------------------------------------------
Personal Web Pages: http://web.ukonline.co.uk/members/tim.kerby/
PIC Site: web.ukonline.co.uk/members/tim.kerby/pic/
The PIC Pages are under construction and I am looking for projects
------------------------------------------------------------------

1997\05\22@044641 by peter noble

picon face
Tony Nixon wrote :

< At the moment I am writing a windows based program that simulates the
< PIC16C84. The software is intended for beginers to PICs, more so for
< students who may be interested in learning to program. It
< graphically displays how the chip functions, and can run code that
< you write yourself. There are also modules that can be connected
< such as a 7 segment display, to see how the ports work.

< The software still has a way to go but if any one would like to try
< it I can make a copy available. Some feedback would be welcome.

Yes please Tony !!  I would love to try out your software and will report
back !
I don't know much about PICs yet but am keen to learn.

TTFN Peter.

1997\05\22@133053 by R. Michael O'Bannon

picon face
At 04:29 AM 5/22/97 -0400, you wrote:
>< The software still has a way to go but if any one would like to try
>< it I can make a copy available. Some feedback would be welcome.


Tony,

I would very much like to have a copy of your software!

Thanks,
Michael


R. Michael O'Bannon, Ph.D.                  email:  TakeThisOuTmobEraseMEspamspam_OUTmindspring.com
Corporate and Clinical Psychologist         voice:  404-237-3883
42 Lenox Pointe, Atlanta, GA  30324         fax:    404-237-3338

1997\05\22@184243 by Bill Merson

picon face
Hi Picsters,
Count me in on evaluating the windows-based simulator. If you want to e-mail
me directly I can be reached at RemoveMEogelbillspamTakeThisOuTaol.com.
Thanks,
Bill Merson

1997\05\24@145943 by Martin Buchholtz

flavicon
face
Yes, I would like to receive a copy of your mail

----------
{Quote hidden}

1997\05\26@052424 by Dieter Jansen

flavicon
face
Hi Tony,

> The software still has a way to go but if any one would like to try
> it I can make a copy available. Some feedback would be welcome.

I have a 6 1/2 year old son (he insists on the 1/2), and he and I
will be building one of the Dontronics SimmStick 84 systems in the
next couple of weeks.  A simulator would probably go down a treat,
and I'd be happy to give it a go.

Cheers, Dieter.

--
Dieter Jansen                                   Tetraplex Pty Ltd
RemoveMEdieterEraseMEspamEraseMEtplex.com.au                      http://www.tplex.com.au/

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