Searching \ for 'MPSIM vs 16C84 TMR0' 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/devices.htm?key=16C
Search entire site for: 'MPSIM vs 16C84 TMR0'.

Truncated match.
PICList Thread
'MPSIM vs 16C84 TMR0'
1996\05\24@035052 by Steve Hardy

flavicon
face
I am using a 16C84 at 4MHz using TMR0 to generate interrupts every
100 cycles = 100us.  This is done by 'bumping the clock forward' in the
interrupt service routine.  This is the code which works in the
simulator (MPSIM):

CYCLES  equ     100
       ...
       movlw   258-CYCLES
       addwf   TMR0,f

This is the code which works in the real device:

CYCLES  equ     100
       ...
       movlw   259-CYCLES
       addwf   TMR0,f

Note the 258 for the simulator and 259 for the device, implying the
device is _slower_ than the simulator.

Now the question:  Am I coming up against one of those limitations of the
simulator related to simulating events on cycle boundaries rather than
Tosc boundaries?

Or am I commiting a PIC faux pas by doing such things to the timer?

Or is it just a bug in MPSIM?

Regards,
SJH
Canberra, Australia

1996\05\24@043412 by fastfwd

face
flavicon
face
Steve Hardy <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

{Quote hidden}

   Maybe.

> Or am I commiting a PIC faux pas by doing such things to the timer?

   No.

> Or is it just a bug in MPSIM?

   Could be.  What version of MPSIM are you using?

   -Andy

Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

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