gnupic: Trouble with gpsim, WDT, and TMR1H


Previous by date: 29 Nov 2004 01:54:33 +0000 Re: symbols name and gpasm, Craig Franklin
Next by date: 29 Nov 2004 01:54:33 +0000 Re: Trouble with gpsim, WDT, and TMR1H, estyler
Previous in thread:
Next in thread: 29 Nov 2004 01:54:33 +0000 Re: Trouble with gpsim, WDT, and TMR1H, estyler

Subject: Trouble with gpsim, WDT, and TMR1H
From: Jeff Jackowski ####@####.####
Date: 29 Nov 2004 01:54:33 +0000
Message-Id: <Pine.OSF.4.44.0411281927240.1186156-100000@bee.hiwaay.net>

I've been working on an odd project for a while, and now I can't add a 
feature because I can't seem to get the timer 1 interrupt to work. So I 
decided to try out gpsim but there are two problems preventing me from 
using it. I installed gpsim from the rpms on the gpsim web site.

First of all, when gpsim starts it enables the WDT. The program I've
written does not use the WDT. I know the config word in the hex file is
set to disable the WDT. If that wasn't the case, it wouldn't run properly
on my test hardware. As gpsim runs the program, it does simulate rests 
caused by the WDT. As a temporary, partial fix, I tell gpsim to simulate a 
2.1GHz pic.

The other problem is that TMR1H does not seem to be writable. Since I'm
trying to have an interrupt trigger when timer 1 overflows, this makes it
difficult to gain any insight into what I'm doing wrong. At some point
during the simulation, TMR1H gets the value 0x3E. I know of no code in my
program that would write 0x3E to TMR1H. Attempting to change the value in
the RAM window does nothing. Also, after the first breakpoint the trace
window shows every subsequent instruction, even goto, reading 0x3E from
TMR1H. An instruction that writes 0xFF to TMR1H is shown as simultaneously
writting 0xFF and reading 0x3E from TMR1H. The same does not happen with
the output to stdout; it doesn't report the read from TMR1H unless that is
what the instruction is coded to do.

The program in question runs on the 16F628, and for extra debugging code, 
the 16F877A. I used the 16F628 code with gpsim.

Is there a way around these problems?

-- 
Jeff Jackowski
        http://ro.com/~jeffj/


Previous by date: 29 Nov 2004 01:54:33 +0000 Re: symbols name and gpasm, Craig Franklin
Next by date: 29 Nov 2004 01:54:33 +0000 Re: Trouble with gpsim, WDT, and TMR1H, estyler
Previous in thread:
Next in thread: 29 Nov 2004 01:54:33 +0000 Re: Trouble with gpsim, WDT, and TMR1H, estyler


Powered by ezmlm-browse 0.20.