• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Oshonsoft PIC Simulator

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #1
Hi,
I have written, using Visual Basic 5, a number of External Modules for the simulator.

Some are available on the Oshonsoft site.
They include:
Push buttons, latching and momentary.
Analog ADC inputs
Keypad 4*4
Edge Switch 4 bank
Stop Watch, measures program loop times
TPIC6595a
25C0409 SPI

If anyone is interested in getting a copy of these programs or if they have a particular piece of hardware they would like to simulate, let me know.
I will let you know if I can do it!:rolleyes:

Also I would like to hear from members who have written modules and are willing like to share.
 
#2
this looks very interesting, i'll download what's available and have a play.

that template looks useful, is that what you've used? i'm a 'hobbyist' that's short of time, but it seems like it might be a quick way for me to have a play.
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #4
blueroomelectronics said:
Wow very cool, how about a Mongoose simulator?
Wouldn't have to look like the Mongoose, just a couple of motors on a virtual H-Bridge & the rotation sensors.
Hi Bill,
I will have to swot up on the Mongoose, I'm assuming its some sort of robot ? and the not the type that eats snakes.:rolleyes:

Oshonsoft already has a 4 pole motor module, playing with the module yesterday, works fine.
I'm hoping to write a short program that will drive Nigels 4 transistor motor driver.

As always, its the available free time

EDIT:
downloaded information from your earlier Mongoose link.
I hope its 'house' trained:p
 
Last edited:
#5
That would be cool, I could work on the bot routines without looking like a terrorist (when I sit in a coffee shop with wires & PCBs all over the table)

I'll post the "maths" later today, I've got to run for my morning coffee.

Now can I bribe you with a choice of PCBs for your effort?
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #6
blueroomelectronics said:
That would be cool, I could work on the bot routines without looking like a terrorist (when I sit in a coffee shop with wires & PCBs all over the table)

I'll post the "maths" later today, I've got to run for my morning coffee.

Now can I bribe you with a choice of PCBs for your effort?
hi,
I have finished the draft VB template for the H bridge linked to the Oshonsoft PIC Sim and I now know what a Mongoose is! [from your links]

So, if you want to post a working program for the Mongoose, I'll give it a go.
If you would prefer not to publish an open source program, PM me and I will send you my email address.

>> Now can I bribe you with a choice of PCBs for your effort?

Don't worry about pcb's, I'm upto the fetlocks in pcbs;)
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #8
blueroomelectronics said:
Open source is fine, it's all about sharing.
hi Bill,
OK, ready to go, as soon you post the program.
 
#9
What program do you want me to post? I've only got snippets for the Mongoose at the moment. As for simulating it I could post a working description of the relationship of the sensors to the wheels, motors etc.

Basically the Mongoose uses a 18F2525 with internal OSC (31KHz thru 32MHz)
CCP1 & CCP2 for the motors speed
PORTB0-3 to set the motors direction
PORTB 4&5 for the sensors (interrupt on change)
The sensors trigger every 108 times per wheel rotation
The motors spin at approx 10,000 RPM under light load @~3V
An RS232 TTL level adapter (for the forthcoming Pellican prototype board with USB to TTL RS232)
A LED which can be jumpered to the LCD/USER connector on top

An interesting feature might be a simulated friction bar for each wheel.

I assumed you were writing hardware modules for the OshonSoft PIC simulator like the LCD panel below. Could you post any of your modules here?
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #10
hi,
Attached zip is for use with the Oshonsoft PIC Simulator.

It requires that you have the Visual Basic runtimes files loaded into your PC.
These runtime files are free from the web.

The zip includes the analog3.exe, which when run will also start the Oshonsoft Sim, also a simple program written in Oshonsoft Basic to demonstrate the analog3 program.

The program displays the ADC channel 0 voltage as a temperature on the LCD.
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #12
blueroomelectronics said:
Hello Eric, it's an old thread but would you mind doing one of your eternal modules for the Junebugs 18F1320 tutor? (schematic is on my site).
hi Bill,
I'll have a look at your site for the Junebug tutor, let you know if I can do it.:)
 
#13
Hi Eric many thanks for your modules, great work. Is there any chance you could simulate a variable resistor to an input pin. I wish to test a program on a 12f508 using rctime (detect when a pin becomes high,low etc on chips without adc),comparing 2 pins via the variable resistors etc, to see if my routine works.
Sorry if i am posting to a to old a thread.
many thanks
sheepdog
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #14
Hi Eric many thanks for your modules, great work. Is there any chance you could simulate a variable resistor to an input pin. I wish to test a program on a 12f508 using rctime (detect when a pin becomes high,low etc on chips without adc),comparing 2 pins via the variable resistors etc, to see if my routine works.
Sorry if i am posting to a to old a thread.
many thanks
sheepdog
hi,
How will the variable resistor be connected.?
You first say that its an R/C voltage decay? and the secondly comparing 2 pins via the variable resistor.

I suspect that the Oshonsoft digital pins will not respond to a variable resistance/voltage, but I will try it, let me know about the way you want to connect it.
 
#15
many thanks for your reply,i was thinking of two variable resistors to two separate input pins. It would be nice if the sim could react in this way but i doubt it too, i have many times in the past wished that the sim would carry on working after @sleep and continue after an interrupt on pin change etc as in real life.
all the best
 
Last edited:
#16
thinking a bit more about it, if the pin change could work @sleep could be substituted by a while 1 loop.Either pin high or low would be great as i can switch between rctime 0 or rctime 1.
many thanks
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #17
many thanks for your reply,i was thinking of two variable resistors to two separate input pins. It would be nice if the sim could react in this way but i doubt it too, i have many times in the past wished that the sim would carry on working after @sleep and continue after an interrupt on pin change etc as in real life.
all the best
hi,
I 'think' it should be possible to create a module that works like this..
You have the option to set: > cap, parallel resistor and charged to voltage on user window.
Also set the hi/lo threshold level for a PIC's input pin in digital mode.

Using the Vcap discharge formula and PIC's threshold voltage, switch the IDE PIC's pin hi or lo.

Would that be acceptable.???
 

ericgibbs

Well-Known Member
Most Helpful Member
Thread starter #19
hi,
Ref the sleep mode, if we substituted a Break command or a DW 0x0001 in place of the sleep command, the IDE would Halt.
Its possible then, using an external module to sense a Pin level which could switch the IDE into Run ultimate.??

EDIT:
Let me look at these over the weekend.....
 
Last edited:

Latest threads

EE World Online Articles

Loading

 
Top