gnupic: gpsim status


Previous by date: 13 Nov 2004 00:18:57 +0000 Re: PICs on Linux, Bill Couture
Next by date: 13 Nov 2004 00:18:57 +0000 Re: 10F206's and PICstart-Plus, Martin McCormick
Previous in thread: 13 Nov 2004 00:18:57 +0000 gpsim status, Scott Dattalo
Next in thread: 13 Nov 2004 00:18:57 +0000 Re: gpsim status, Peter L. Peres

Subject: gpsim status
From: Scott Dattalo ####@####.####
Date: 13 Nov 2004 00:18:57 +0000
Message-Id: <Pine.LNX.4.60.0411121436480.20553@ruckus.brouhaha.com>

Those of you monitoring CVS may have seen a few changes in gpsim over the 
last couple of weeks. I've been working on attributes and command line 
expressions.

Command line expressions are really useful. In previous versions of gpsim, 
you could view the contents of a register by typing either:

   x reg_name

or

   symbol reg_name

If you wanted to change the value of  register, you had to type:

   x reg_name new_value

With command line expressions, you can examine a register simply by typing 
it's name. E.g. to view the contents of the variable named 'failures'

  gpsim> failures
failures [0x0c] = 0x84 = 0b10000100

If you want to change its value, you simply write:

  gpsim> failures = 0;

Or you can do something like this:

  gpsim> failures = temp1 * 2

or

  gpsim> failures = temp1 & 0b11110000

-----

Attributes

There have been many significant changes to the way gpsim handles 
attributes. At the moment, there's nothing really too visible on the 
outside. However, if a module has attributes, it's now possible to control 
those via the command line. The only attribute that exists in the new 
format is the X,Y coordinate of a module in the browser window. If you 
open the breadboard viewer, two floating point attributes called 'xpos' 
and 'ypos' are created. You can tinker with them just as though if they 
are symbols. Eg.

  gpsim> p16f628.xpos
  72.00000

Or you can reposition a module using the command line:

  gpsim> p16f628.xpos = 100.0

(note, since the attribute is a floating point type, only floating point 
constants can be assigned to it - there's no real good reason to make the 
attribute a floating point one; this was just the first example I 
created).

I plan to resurrect the UART module and instrument it with attributes so 
that you'll be able to write stuff like:

   U1.txbaud = 9600
   U1.txreg = 0xff   # send a break
   U1.rxreg          # display the rx register
   U1.status         # display the state of the uart module

----

GUI

I've also been tinkering with the gui. All of the changes apply to the 
'gui2' CVS tag. So far all that's been done is that the register window 
has been redesign so that it no longer uses the gtkextra sheet widget. 
It's currently not useable, but it will be soon.

Scott

Previous by date: 13 Nov 2004 00:18:57 +0000 Re: PICs on Linux, Bill Couture
Next by date: 13 Nov 2004 00:18:57 +0000 Re: 10F206's and PICstart-Plus, Martin McCormick
Previous in thread: 13 Nov 2004 00:18:57 +0000 gpsim status, Scott Dattalo
Next in thread: 13 Nov 2004 00:18:57 +0000 Re: gpsim status, Peter L. Peres


Powered by ezmlm-browse 0.20.