[Ktechlab-devel] PIC simulation

P Zoltan zoltan.padrah at gmail.com
Fri Sep 11 19:13:21 UTC 2009


On Fri, 11 Sep 2009 20:44:29 +0200, Matthew Ayres  
<solar.granulation at gmail.com> wrote:

> This is quite interesting, as the flowcode does indeed work as you say.
>
> Now I'm at a total loss, though, as to why the .cod file I was using
> doesn't.  Under gpsim's standalone interface it seems to work perfectly.
> Since this was a test of KTechLab rather than my understanding of PIC  
> code I
> used an example from this web page:
> http://www.micahcarrick.com/04-19-2005/pic-programming-linux.html

If you run the program in ktechlab, step by step, it will still work.   
However, here is no delay in that example between setting the port low and  
high, so you will not be able to see the actual voltage change (there are  
some gliches too, in ktechlab, because a current appeares on the pin, not  
voltage...).  Also look at the cpu usage when simulating it in ktechlab...  
it will be quite high, because here's no delay.

>
> Oh, um, if the chip doesn't have V pins, isn't that a little unrealistic?
> As I say I'm new to the world of PIC programming!

  I never programmed a pic... In my opinion, for digital circuits, it's not  
that essential to have the supplies represented. A sane design shouldn't  
play with supplies.

>
> Thanks for illuminating this further.
>
> On Fri, Sep 11, 2009 at 7:29 PM, P Zoltan <zoltan.padrah at gmail.com>  
> wrote:
>
>>
>>  No, the're not needed. Something else is the problem. I've tested it  
>> with
>> the SVN version and works for me (tm). :)
>>
>>  The PIC component can be simply dragged in a circuit, press the load
>> button, load your program, then press the "play" button at the bottom  
>> of the
>> PIC. After that the voltage on the pins of the pic should change.
>>
>>  I'm attaching a flowcode that makes 1 pin of the pic change its state  
>> in
>> 0.5sec.
>>
>>
>>
>>
>> On Fri, 11 Sep 2009 19:23:51 +0200, Matthew Ayres <
>> solar.granulation at gmail.com> wrote:
>>
>>  It doesn't work, so presumably they are needed.  I could find no other
>>> pins
>>> that would do the job.
>>>
>>> Could it be that this is an oversight in whatever template or other  
>>> system
>>> is used for PIC simulation?  Would the fault lie in gpsim?
>>>
>>> On Fri, Sep 11, 2009 at 6:09 PM, Zoltan Padrah <zoltan.padrah at gmail.com
>>> >wrote:
>>>
>>>
>>>> I guess the supply pins are not needed. You could simulate the circuit
>>>> without them. Or it doesn't work?
>>>>
>>>> 2009/9/11 Matthew Ayres <solar.granulation at gmail.com>
>>>>
>>>>  I've been hoping to use KTechLab to learn a bit about PIC programming
>>>>> without having to actually invest in the hardware yet.  To that end I
>>>>> loaded
>>>>> a simple program into the PIC component in the circuit designer,  
>>>>> just a
>>>>> little LED blinker for the 16F627.
>>>>>
>>>>> The problem is that, although pins RA0-7 and RB0-7 were present,  
>>>>> there
>>>>> were no V pins!  Consequently I could not power the chip in the
>>>>> simulation.
>>>>> Why would this be?  What can I do about it?
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>>>> 30-Day
>>>>> trial. Simplify your report design, integration and deployment - and
>>>>> focus
>>>>> on
>>>>> what you do best, core application coding. Discover what's new with
>>>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>>>> _______________________________________________
>>>>> Ktechlab-devel mailing list
>>>>> Ktechlab-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>>> 30-Day
>>>> trial. Simplify your report design, integration and deployment - and
>>>> focus
>>>> on
>>>> what you do best, core application coding. Discover what's new with
>>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>>> _______________________________________________
>>>> Ktechlab-devel mailing list
>>>> Ktechlab-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel
>>>>
>>>>
>>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and  
>> focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> 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