im jus starting this course in uni where we use the PIC 18F452. we use the PICDEM2 Plus boards and ICD2 debuggers. I want to try and get myself some practice outside of lab hours and also to be able to test code when i write it at home.
Is there any software where I can simulate a PIC on my laptop and not need any additional hardware? in one of my previous posts someone suggested oshonsoft and their PIC18 simulator seems quite good. how do i use it with MPLAB tho?do i write and compile the code in MPLAB and then convert it to HEX?or is there another program I can use.
I thought of buyin the PICDEM board and the debugger, but it can be quite expensive.
are the PICkit2 boards the same?or are they jus debuggers?
MPLAB has its own simulator. Just choose MPLAB SIM under debugger and you are ready to go. It does not have the nice high level IO dodads (like LCD) that oshonsoft has but it works.
This will also give you a chance to get used to the MPLAB debugger.
hi,
Oshonsoft has its own inbuilt assembler [and Basic] it generates hex files that can be run under Oshonsoft OR the hex file can be 'imported' to MPLAB to enable the programming of the PIC.
You do require the programming hardware, I use PicStart+.
The hex files that MPLAB generates are compatible with Oshonsoft and can be run in the simulator.
A point to note any Basic files you write and compile in Oshonsoft Basic creates an 'asm' file that can be used with MPLAB. It may need a small edit, but its no big deal.
So Oshonsoft and MPLAB are compatible in both directions.
The LED's on OS can be selected for any PIC port pin.
The Include files come with MPLAB and are installed when you instal MPLAB
so i found the assembler..so does that mean i can jus copy and paste the assembly code i get?or is there a way to import the numbers into the assembler?
and wht about the include files?how do i insert them into the programs?do i need to keep them in the same directory as the program files will be?i know where the include files are and that wont be a problem.
when you say you require programming hardware, does that mean to run the simulator properly i need this hardware connected?cant i run a simulation without any hardware?
is there any site or link where i can get a tutorial or help pages to run the simulation?
yeah..basically i want to vary the input to the AD converter so that I can display it on the LEDs or something like that. which module do you use to change the inputs to the ADC?
the include files are in the MPLAB directory right? and then do i hav to copy the include files to the directory also?and as you showed jus include them in the header right?
i'll b using it jus to test out my code before i go to the lab where i will then program the PIC.
yeah..i've installed both MPLAB and OS. now only thing is I have to figure out how to use OS properly..
yeah..basically i want to vary the input to the AD converter You can do that
so that I can display it on the LEDs or something like that. which module do you use to change the inputs to the ADC? and that
the include files are in the MPLAB directory right? Yes
and then do i hav to copy the include files to the directory also? No
and as you showed jus include them in the header right? Yes
i'll b using it jus to test out my code before i go to the lab where i will then program the PIC. OK
yeah..i've installed both MPLAB and OS. now only thing is I have to figure out how to use OS properly.. Ask I will try to help also read the OS documentation.
well..basically need resources on familiarising myself with OS and also knowing the modules which can be used for variable resistors and stuff like that...
i guess i should get programming and try out a few programs...
the first program i wanna test needs the variable resistors..how do i get those?
is it a big disadvantage not being able to debug C at the C level?so basicall using C would mean that i have to write the code in MPLAB and then create a hex file or a asm file?
so basic flow of stuff to do would be,
1. write code in MPLAB
2. Build (?)
3. load program in OS using either asm or hex(?) - any alterations needed in the files?
well..basically need resources on familiarising myself with OS and also knowing the modules which can be used for variable resistors and stuff like that...
i guess i should get programming and try out a few programs...
the first program i wanna test needs the variable resistors..how do i get those?
is it a big disadvantage not being able to debug C at the C level?so basicall using C would mean that i have to write the code in MPLAB and then create a hex file or a asm file?
so basic flow of stuff to do would be,
1. write code in MPLAB
2. Build (?)
3. load program in OS using either asm or hex(?) - any alterations needed in the files?