Convert from 20MHz to 4 MHz
[pic-uart.git] / env.conf
bloba4580a7eb8d84d21cd200f15083d0478fc2d5d8d
1 # create a new node 'n'
2 node n
4 # load the gpsim modules library. For some reason I can't just load it from /usr/lib
5 # so to get this working, I had to issue a 'ln -s /usr/lib/libgpsim_modules.so.0 /tmp/libgpsim_modules.so'
6 module lib /usr/lib/libgpsim_modules.so.0
8 # create an USART called 'U1'
9 module load usart U1
11 # attach both the TX bit of the PIC 'portb2' (RB2) and the RX pin of the U1 USART
12 # to the node n. This means: connect them together
13 attach n pin(portb2) U1.RXPIN
15 # make the console from the U1 USART do something. In our case, it will display the characters submitted by the PIC
16 U1.console = true
18 #this is actually 2400, but we're using a
19 #SPBRG for a 4MHz clock instead of 20MHz
20 U1.rxbaud = 12000
22 # tell the builtin scope in gpsim to monitor portb2 
23 # (in gpsim: Windows -> Scope)
24 scope.ch0="portb2"
26 #this value doesn't matter, as gpsim usart is relative to the frequency
27 frequency 4000000