gnupic: Question regarding gpsim


Previous by date: 21 Oct 2002 07:43:05 -0000 Re: Question regarding gpsim, Scott Dattalo
Next by date: 21 Oct 2002 07:43:05 -0000 GPSIM fonts hassle., Declan Moriarty
Previous in thread: 21 Oct 2002 07:43:05 -0000 Re: Question regarding gpsim, Scott Dattalo
Next in thread:

Subject: Re: Question regarding gpsim
From: Tobias Schlottke ####@####.####
Date: 21 Oct 2002 07:43:05 -0000
Message-Id: <Pine.LNX.4.31.0210210931110.22745-100000@lemorio.netcs.com>

On Sun, 20 Oct 2002, Scott Dattalo wrote:

> > prog.stc contains the following:
> >
> > #------------------------------------------
> > processor pic16f84 fred
> > load s prog.cod
> > node n1
> > stimulus asy initial_state 1 name m_in end
> > attach n1 m_in porta0 porta1 porta2
> > #-----------------------------------------
> >
> > Then I do a dump.
> >
> > What I expect is portb equal 07,
>
>   You mean PORTA?

Yes, sorry. Just a typo (in this mail).

> > because the lower three bits are set.
> > But I get 00.
> > The same if I load the instruction file
> > from the cli with
> > load c prog.stc
> >
> > If I execute every instruction manually
> > into the cli, I get the expected result.
> >
> > What do I do wrong?
>
>
> It may be fred who's the problem.
That might be the problem. I thought
fred is just an identifier for the processor.

> Are you sure 1) You're looking at the right
> port (a) or (b), 2) That the TRIS bits are set
> properly?

1) Yes I'm sure. When I tested, I used cut and
paste.
2) I did the load of the stc file right after
start gpsim. So PIC is reset state, all pins
configured to IN => tristate.
I didnt do any processor cycle.

> I'm not discounting a bug in gpsim... If
> you're sure that fred is behaving properly,
> then a workaround in the stimulus file can be:
>
>
>  stimulus asy
>   initial_state 1
>   start_cycle 1
>
>   period 0x10000000
>
>  # cycle  data
>     2       1
>
>   name m_in
>  end
>
>
> This should work. What it says is that at
> cycle # 1 (start_cycle) begin the stimulus
> with the initial state of 1. At cycle
> 2+start_cycle set the stimulus to "1" (no
> effect since it is already 1). Then after
> 0x10000000 cycles repeat this (again, no
> observable effect since the output is already
> high).

Thanks, I will try.

Best regards,
Toby


Previous by date: 21 Oct 2002 07:43:05 -0000 Re: Question regarding gpsim, Scott Dattalo
Next by date: 21 Oct 2002 07:43:05 -0000 GPSIM fonts hassle., Declan Moriarty
Previous in thread: 21 Oct 2002 07:43:05 -0000 Re: Question regarding gpsim, Scott Dattalo
Next in thread:


Powered by ezmlm-browse 0.20.