[Ktechlab-devel] Pic interrupts solved.

P Zoltan zoltan.padrah at gmail.com
Sun Sep 20 17:41:46 UTC 2009


On Wed, 16 Sep 2009 18:28:26 +0200, santiago gonzalez
<santigoro at gmail.com> wrote:

> Ok... i think now pic simulation work quite better, the simulation run in
> two diferent ways:
>
> -When runed from the circuit button (play), simulation goes at real time  
> for
> a 20 MHz compiled pic code, registers are not updated, breakpoints  
> doesn't
> have effect, it's just like powering the pic.
>
> -When running from the code (execute), it run slower and updates  
> registers
> view every 25 ms and every cycle when step-by-step, breakpoints and any
> other debug feature works here.
>

  From the point of usability I don't know if this is the best approach.  
Maybe adding a "debug code" property to the PIC and setting it depending  
on the code launch method would be better. Your assuptions on the usage  
are good, but you can't know for sure what the user actually want. Maybe  
he wants to load the program on a pic, run it for a while, and only after  
that start it debugging (in the middle of the simulating process).

  Also some "mystic" slowdowns or speedups would really annoy me (if I  
don't have control over it).

> Now i need two things:
>
> -Create the "clock Mhz" property or any other way that the user can  
> choose
> the clock speed. Someone can give a hand wit this?

  I don't know how the PICs works? Do they have clock/quartz input, and/or  
set up their operating frequency by them? We should do it in a way that  
resembles more the real hardware.

>
> -Someway to know the voltage level in a pic pin, actually all are  
> defined as
> logicin or logicout, i tried to understand how to do this but i can't  
> find
> the correct way, i had a look to adc component, but have lot of errors  
> bcos
> i really don't understand what i'm doing... all what i need is a float  
> value
> of the voltage level at the input pins.... someone can point me to a way  
> to
> follow?

  The logic in/out voltage levels can be set in "configure ktechlab" ->  
"logic" window. I gues the exact voltage is known only in logic in/out.

>
>
> 2009/9/15 santiago gonzalez <santigoro at gmail.com>
>
>> Hi Jose..
>>
>> I would like to find the way to have real-time simulations when in  
>> run-mode
>> (only for circuit simulation) and a step-by-step or run-step-by-step  
>> when in
>> debbuging mode.
>>
>> It looks that actually ktechlab always run in debug mode, then ktechlab
>> calls gpsim every step, but i think is possible to run gpsim in  
>> real-time
>> and just wait for gpsim to update port's register changes and call gpsim
>> just when some pin value is changed (not sure). This should be only  
>> when the
>> "play" button in the circuit is pressed; when debbuging code and  
>> watching
>> registers and so it could run in debugging mode as actually... but this  
>> is
>> just a though... still have to understad better how works the gpsim
>> interface.
>>
>> There is also the cuestion of analog inputs, but actually i don't know  
>> how
>> to deal with this.
>>
>> Anyway if you want to try the ktl-0.3.7 with interrupts working you can  
>> try
>> a .deb package in the "pic linux" forum; just look for the thread:  
>> "ktechlab
>> y simulacion de una interrupcion en 16f84".
>>
>> Regards.
>>
>>
>> 2009/9/15 Jose Luis Galvez Lopez <digigalos at yahoo.es>
>>
>>> Congratulations. When will the new version?
>>> P No imprimir si no es necesario. Protejamos el Medio Ambiente.
>>> Do not print if it is not necessary. Protect Enviroment.
>>> digigalos <http://digigalos.es>
>>> Software libre <http://es.wikipedia.org/wiki/Software_libre>,  
>>> conocimiento
>>> libre <http://es.wikipedia.org/wiki/Conocimiento_libre>, cultura  
>>> libre<http://es.wikipedia.org/wiki/Cultura_libre>
>>> .
>>> Usuario Linux <http://counter.li.org/> nº 299.452
>>> Declaración de independencia del  
>>> ciberespacio<http://es.wikisource.org/wiki/Declaraci%C3%B3n_de_independencia_del_ciberespacio>
>>>
>>>
>>> ------------------------------
>>> *De:* santiago gonzalez <santigoro at gmail.com>
>>> *Para:* ktechlab-devel <ktechlab-devel at lists.sourceforge.net>
>>> *Enviado:* martes, 15 de septiembre, 2009 8:57:12
>>> *Asunto:* [Ktechlab-devel] Pic interrupts solved.
>>>
>>> I think today is my lucky day... i should buy lottery.. :)
>>>
>>> Found the problem with interrupts that didn't work in ktechlab but  
>>> work in
>>> gpsim.
>>> I think now the pic simulation is faster and my PC's processor doesn't
>>> speed up.
>>>
>>> With a pic program coded at 4MHz, ktechlab  simulates it at near
>>> real-time... perhaps 2/3
>>> I think the aim should be real-time when in run-mode.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart  
>>> your
>>> developing skills, take BlackBerry mobile applications to market and  
>>> stay
>>> ahead of the curve. Join us from November 9-12, 2009. Register
>>> now!
>>> http://p.sf.net/sfu/devconf
>>> _______________________________________________
>>> Ktechlab-devel mailing list
>>> Ktechlab-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel
>>>
>>>
>>




More information about the Ktechlab-devel mailing list