gnupic: Re: [gnupic] terminal simulation on gpsim?


Previous by date: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Next by date: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Previous in thread: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Next in thread: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem

Subject: Re: [gnupic] terminal simulation on gpsim?
From: Scott Dattalo ####@####.####
Date: 9 Mar 2006 21:54:57 +0000
Message-Id: <4410A415.4020102@dattalo.com>

Borut Razem wrote:
> Hi Bill,
> 
> you have two possibilities:
> 
> - use the usart module (already a part of libgpsim_modules), which uses 
> the GUI. See the example in the directory gpsim/examples/modules/usart_gui
> - use the usart_con module, which doesn't use the GUI: it displays the 
> received characters directly to the console: gpsim/extras/usart_con

Bill,

I'll second Borut's comments; gpsim does have a terminal emulator that 
will accept RS232. An example of its usage can be found in 
regression/usart_test/

The key things to note is that there are four attributes in the Usart 
module. For example, suppose you name the usart module U1:

module load uart U1

Then there are 4 attributes named: U1.rxbaud, U1.txbaud, U1.rx, U1.tx. 
The first two are the receiver and transmitter baud rates. The last two 
are the receiver register and transmit register. The receiver register 
holds the last byte that was received (and if the module is tied to a 
PIC then this should be last byte that was transmitted by the PIC). 
Similarly writing a value to the transmit register will initiate a transmit.

You can also get a description of an attribute via help:

gpsim> help U1.tx
TxBuffer: U1.tx=0
UART Transmit Register


Borut,

The usart_con module slipped by without me noticing! Why did you add a 
whole new module instead of adding a way for the existing one to direct 
its output to a console?

Scott

Previous by date: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Next by date: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Previous in thread: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem
Next in thread: 9 Mar 2006 21:54:57 +0000 Re: [gnupic] terminal simulation on gpsim?, Borut Razem


Powered by ezmlm-browse 0.20.