Picsimlab interesting simulator.

PICSIMLAB

Picsimlab is a series of coaches to simulate microcontrollers from Microchip family and specifically the 16F628, 16F877 and 18F452.
It is very intersante this program and so I want to put here.
This pet believes it recently and stay on the server.

 

http://www.mediafire.com/download/2d372tltqsllm7x/picsimlab0.5.0.pet

 

We will work with him and Gputil, and we will do several simulations.
We will have to consider the schemes as I said are staying in

/usr/share/picsim/lab/doc

We will work with the coaches board with  1-4 Mhz according see in the image.

 

Well corresponding to the coach diagram as shown in the directory that is the above as follows:


This what you could see in your directory is installed by default and good will do now a program turn the LED 1 corresponding to RB0 terminal.

We can also see that the switch S3 is connected to RA4 terminal, with all this we make the following code.

Consider leaving a space at the beginning of __CONFIG because otherwise fails.
I advise the file as this lower it as is in the link below.

first.asm
processor PIC16F628A
include “p16f628a.inc”
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC
org 0x00;
goto Home
org 0x05; Source code
initiation
bsf STATUS, RP0; We turn to Bank 1
b’11111110 movlw ‘
movwf TRISB; We all port A input minus output duckling RB0
b’11111 movlw ‘; All port becomes A Ticket
movwf TRISA; W is loaded into TRISA
bcf STATUS, RP0; He spends the Bank 1 to Bank 0
bcf PORTB, 0; Volvemosa to Baanco 0
loop
btfss PORTA, 4; See if we S3 button pressed and if so off led
goto Off; If set to 1 logical, the LED goes out
bsf PORTB, 0; If this logical 0, the led
goto loop; the condition of Pulsador.- verified
Turn Off
bcf PORTB, 0; They switch the LED
goto Loop
end
We have to have gputils this in this blog installed.

Once downloaded the “first.asm” file what I did is to place it in the directory examples of picsim in:

/usr/share/picsim/examples

and here I think a /EXERCISES with full address   /usr /share/picsim/examples/EXERCISES.

Well once placed there you compile this file as follows:

gpasm  -c first.asm

And among the files that come out each object I get what I link first.o follows to create the hexadecimal.

gplink -o first.hex first.o 

With this we have created our file Hex first.hex

It will appear a message like this:
message: using default linker script: /usr/local/share/gputils/lkr/16f628_g.lkr
but this is normal.
Now all we have to charge this hexadecimal simulator and we are working in the directory where this our hex file and pressed on board the PWR switch simulator and see what we RB0 LED lights according to the program that got him and if we press the button RA4 as the LED will turn off as we had planned.

Now all we have to charge this hexadecimal simulator and we are working in the directory where this our hex file and pressed on board the PWR switch simulator and see what we RB0 LED lights according to the program that got him and if we press the button RA4 as the LED will turn off as we had planned.

Exercise 2 picsimlab for coaches board 4 _ Shows like a display comes on and tells the numbering:

http://www.mediafire.com/download/d77b5xt948ixt2x/segundo_picsimlab_P4.tar.gz

.
For the Display go faster or vary the program delays or increased the clock speed of the Pic.

Well here we have the coach and everything worked under Linux.
You have a lot of examples on the coach but I’ll put more.
Hope you like it and if so let your opinion … .. See you.

6 responses

  1. que tan reciente es esto?
    a la hora de publicar el codigo, se crearon errores…

    Like

    30 October, 2015 at 11:36 pm

  2. Que errores se te produjeron puedes especificarlos?

    Mejor bajate los el archivo comprimido del segundo ejercicio que te vienen todos los archivos en el enlace, elimina el archivo hex y cod o renombralo y compilalo el archivo asm tal como te explica en el archivo de texto LEEME.TXT

    Pruebalo y me cuentas.

    Saludos.

    Like

    31 October, 2015 at 11:33 am

    • lo que pasa es que parece que el traductor tambien se aplico’ al codigo y tiene varias lineas mal.
      le hice las correcciones evidentes y me funciono’ bien. gracias.

      Like

      1 November, 2015 at 1:34 am

  3. Si quieres puedes seguir este tema en el blog en español en:

    https://misterelectronico.wordpress.com/2015/03/19/picsimlab-un-simulador-de-pic-muy-interesante/

    Like

    31 October, 2015 at 11:43 am

  4. Si, gracias, mejor seguire’ el blog en espanol. buen trabajo. interesante blog.

    Like

    1 November, 2015 at 1:35 am

  5. Suerte Jorge

    Like

    2 November, 2015 at 12:07 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s