gnupic: Thread: Troubles with PCON


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Troubles with PCON
From: "Nestor A. Marchesini" ####@####.####
Date: 21 Jul 2001 08:59:23 -0000
Message-Id: <000e01c111c2$e763f5a0$ccff2dc8@Marchesini>

Hi Gnupic

processor 16f877
gpsim 0.20.1 in .i386..rpm
RedHat 7.1 core 2.4.2-2
GUI KDE
PIII at 700Mhz
assembler gpasm 0.9.8-1.i386.rpm

me code:
;
Start
;
;/* Check reset POR = 0 */
;
      bsf     STATUS,RP0             ;Bank 1
      bcf     STATUS,RP1             ;
      btfss   PCON,NOT_POR     ;? Power = On ?
      goto    PowerOn                    ;Not
;
;/* Check if ocurrió a reset by drop of tension BOR = 0 */
;
      btfss   PCON,NOT_BOR     ;¿ Drop tension in the +5 Volts ?
      goto    PowerOn                    ;Yes

the error displayed by gpsim in the terminal

16F877   0x0496  0x1683    bsf   status,5
    read: 0x7c from status
  wrote: 0x3c to status
   cycle: 0x026
16F877   0x0497  0x1303    bcf   status,6
    read: 0x7c from status
  wrote: 0x3c to status
   cycle: 0x027
attempt read from invalid file register
16F877   0x0498 0x1C8E    btfss   TMR1L,1
    read: 0x00 from indf
   cycle: 0x028

I try to install gpsim 0.20.9 in .tar.gz and get errors.
Is support the register PCON by gpsim 0.20.1 ?

thanks in advance.

:)

Nestor A. Marchesini
Chajari-Entre Rios-Argentina
ICQ # 50983752 nick colo
####@####.####






Subject: Re: Troubles with PCON
From: Scott Dattalo ####@####.####
Date: 21 Jul 2001 15:35:45 -0000
Message-Id: <Pine.LNX.4.33.0107211031170.25855-100000@tempest.blackhat.net>


On Sat, 21 Jul 2001, Nestor A. Marchesini wrote:

> me code:
> ;
> Start
> ;
> ;/* Check reset POR = 0 */
> ;
>       bsf     STATUS,RP0             ;Bank 1
>       bcf     STATUS,RP1             ;
>       btfss   PCON,NOT_POR     ;? Power = On ?
>       goto    PowerOn                    ;Not
> ;
> ;/* Check if ocurrió a reset by drop of tension BOR = 0 */
> ;
>       btfss   PCON,NOT_BOR     ;¿ Drop tension in the +5 Volts ?
>       goto    PowerOn                    ;Yes
>
> the error displayed by gpsim in the terminal
>
> 16F877   0x0496  0x1683    bsf   status,5
>     read: 0x7c from status
>   wrote: 0x3c to status
>    cycle: 0x026
> 16F877   0x0497  0x1303    bcf   status,6
>     read: 0x7c from status
>   wrote: 0x3c to status
>    cycle: 0x027
> attempt read from invalid file register
> 16F877   0x0498 0x1C8E    btfss   TMR1L,1
>     read: 0x00 from indf
>    cycle: 0x028
>
> I try to install gpsim 0.20.9 in .tar.gz and get errors.
> Is support the register PCON by gpsim 0.20.1 ?

First, the PCON register is not supported in gpsim. The good news is I
just added it and will try to get a 0.20.10 out within 24hrs with the
change. gpsim doesn't fully simulate the reset conditions, so the POR
and BOR bits will essentially be general purpose bits. (Upon startup,
both bits will be cleared. After a reset, they'll also [improperly] be
cleared).

I'm going to try to get an RPM built to simplify the install problems
everyone is having with gpsim.

Scott

Subject: RE: Troubles with PCON
From: "Nestor A. Marchesini" ####@####.####
Date: 21 Jul 2001 23:01:18 -0000
Message-Id: <006b01c11238$8644aa00$ccff2dc8@Marchesini>

Scott

----- Original Message -----
From: Scott Dattalo ####@####.####
To: Nestor A. Marchesini ####@####.####
Cc: ####@####.####
Sent: Saturday, July 21, 2001 12:43 PM
Subject: Re: Troubles with PCON


>
>
> On Sat, 21 Jul 2001, Nestor A. Marchesini wrote:
>
> > me code:
> > ;
> > Start
> > ;
> > ;/* Check reset POR = 0 */
> > ;
> >       bsf     STATUS,RP0             ;Bank 1
> >       bcf     STATUS,RP1             ;
> >       btfss   PCON,NOT_POR     ;? Power = On ?
> >       goto    PowerOn                    ;Not
> > ;
> > ;/* Check if ocurrió a reset by drop of tension BOR = 0 */
> > ;
> >       btfss   PCON,NOT_BOR     ;¿ Drop tension in the +5 Volts ?
> >       goto    PowerOn                    ;Yes
> >
> > the error displayed by gpsim in the terminal
> >
> > 16F877   0x0496  0x1683    bsf   status,5
> >     read: 0x7c from status
> >   wrote: 0x3c to status
> >    cycle: 0x026
> > 16F877   0x0497  0x1303    bcf   status,6
> >     read: 0x7c from status
> >   wrote: 0x3c to status
> >    cycle: 0x027
> > attempt read from invalid file register
> > 16F877   0x0498 0x1C8E    btfss   TMR1L,1
> >     read: 0x00 from indf
> >    cycle: 0x028
> >
> > I try to install gpsim 0.20.9 in .tar.gz and get errors.
> > Is support the register PCON by gpsim 0.20.1 ?
>
> First, the PCON register is not supported in gpsim. The good news is I
> just added it and will try to get a 0.20.10 out within 24hrs with the
> change. gpsim doesn't fully simulate the reset conditions, so the POR
> and BOR bits will essentially be general purpose bits. (Upon startup,
> both bits will be cleared. After a reset, they'll also [improperly] be
> cleared).

This is great !!! such only say and you make the changes,  I hope some day
learn more of C, C++, and can adding me contribution to Gnupic.

> I'm going to try to get an RPM built to simplify the install problems
> everyone is having with gpsim.

In me opinion this is a shape easy of install and uninstall, to install news
versions.

> Scott

thanks again

:)

Nestor A. Marchesini
Chajari-Entre Rios-Argentina
ICQ # 50983752 nick colo
####@####.####


[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.