navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 24, 2012, 01:26:12 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Virtual Bread Board and PICS/ARDUINOs  (Read 1388 times)
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« on: March 08, 2011, 02:03:41 PM »

Has anyone used this simularor for the ARDUINO's/PICs? 

http://www.virtualbreadboard.net/
It looks very nice in the demos.  The ability to simulate Arduino code looks very useful

Sean
 
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
stephendv
Sr. Member
****
Offline Offline

Posts: 441



WWW
« Reply #1 on: March 08, 2011, 03:51:39 PM »

That would be bl00dy useful!  The compile -> upload -> test cycle in arduino is excruciating.  I'd be over the moon if you could also write unit tests for it  Smiley
Logged

http://www.casanogaldelasbrujas.com
2.8kW PV, SMA Sunny Island 5048, 5 PzS 700 battery bank, stinky diesel.
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #2 on: March 09, 2011, 08:41:24 PM »

Not too impressed.
Install didn't check for pre-requisites. No real instructions or help files so you have to just try things to see what happens.
Breadboard is OK for simple items, switches LEDs etc but nothing complicated. On the other hand a lot of the projects in the Arduino playground don't use anything more complicated than this.

Didn't find how to get any control over or details from Arduino simulator eg variable values.
PIC simulator seems much better, gives same facilities as other simulators (plus graphic display for simple things) . Its controlled by the (unlabelled) right hand set of icons on the top toolbar.
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #3 on: March 09, 2011, 08:49:45 PM »

Eric
thanks. I have used PROTEUS for PICs which is quite useful. Eric have you used PROTEUS and how would you compare the two?
Sean
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #4 on: March 09, 2011, 09:16:41 PM »

Sean,
Never used PROTEUS.
I normally use the simulator built into MPLAB - its useful because you can input quite complex data streams  eg 1 wire signals - if you have the patience to code up the waveform.
For playing with analog inputs I find the simulator in Oshonsoft Basic is quite good, but a bit tedious because you have to run through until the port is setup before you can apply the voltage.

Eric
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #5 on: March 09, 2011, 10:44:24 PM »

eric
I also use mplab and like it a lt apart from the lack of linux and OSX support.
I find the system for coding waveforms - a stimulus file generated from a spreadsheet like table deeply annoying. One very useful thing would be one wire excitation sequences. There is another method badly documented using a small subset of VHDL.  did have a go at coding this up but only the most basic VHDL commands seemed to work. I got fed up of messages such as "feature not implemented yet". If you do have stimulus files for 1-wire sequences I would love to have them! I know it is tedious rather than difficult but I never have had the patience (or time).
Sean
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #6 on: March 10, 2011, 02:09:25 PM »

Sean,
I typed in the odd sequence but never saved them in a meaningful manner.
I was tempted to do a program to write the stimulus file but was put off by the "Do not edit" comment at the top. However I've now discovered the SCL file which should be safer to create.
If I restrict it to doing reading and writing bytes (ie no Search_ROM) together with reset and presence pulses it looks very do-able by just specifying the transitions in a dumb manner.
 
Eric
Logged
SteveH
Hero Member
*****
Offline Offline

Posts: 1079



« Reply #7 on: March 10, 2011, 10:05:59 PM »

Just like to say thank you to both of you for voicing this in open forum... great info... just off to try to understand more

Thanks,

Steve...
Logged

Preveli, South Crete.
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #8 on: March 11, 2011, 03:35:35 PM »

Sean,

Here is a crude Perl script to generate an .scl file containing 1 wire signal sequences from a text file, for use with MPLAB. 
It generates the VHDL in its most basic form so should have no problems with limited funtionality.
The format of the input file is given at the top of the program. It may not be optimum but it sure beats typing in transitions in the spreadsheet format.
While its set up for the PIC12F683 its very simple to change it to other devices.

Eric

* text2scl.txt (3.6 KB - downloaded 52 times.)
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #9 on: March 11, 2011, 03:57:45 PM »

Eric

many thanks! genuflect. I don't know where you find the time. I got fed up of coding the stimulus files. Had hoped to automatate things and writing hundreds of lines such as below did not appeal! Sadly the day job is very time consuming at the moment I want to look at the 16F1827 chips but don't have the time at present. This will be very useful particularly for students.

Have a virtual applaud! The beers are on me if you ever get to StBC. Wyleu was here last week and we had some very interesting discussions


Sean

------------------------------------

configuration for "pic12f683" is
end configuration;


testbench for "pic12f683" is
begin
    process is
    begin
        wait;
    end process;

    // DQ high for SFR register etc, setup
    clk_56: process is
        variable clk_56_end: cycle;
    begin
        wait for 50 ic;
        clk_56_end:= 430 ic;
        report "DQ high for SFR register etc, setup";
        loop
            GP2 <= '1';
            if clk_56_end - now() < 430 ic then
                wait for clk_56_end - now();
            else
                wait for 430 ic;
            end if;
            exit when now() >= clk_56_end;
            GP2 <= '0';
            if clk_56_end - now() < 0 ic then
                wait for clk_56_end - now();
            else
                wait for 0 ic;
            end if;
            exit when now() >= clk_56_end;
        end loop;
        GP2 <= '0';
        wait;
    end process clk_56;

    // Long DQ low -Master reset
    clk_57: process is
        variable clk_57_end: cycle;
    begin
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!