(you are viewing a thread; or go back to
list of threads)
Loading Code into Micro (by Richard Herzberger)
I am new to working with micro controllers but am familiar with ladder logic. I love the way LDmicro program works and simulates my code and the learning curve was quite short, but I am having problems getting it to load error free into my PIC processor. I have tried several PIC processors all with no success. The programmer I am using is K150V2, I get the code to compile error free, load the Hex file to the programmer and load it to the PIC but I have yet to get one to run. I use other Hex files created in C++ and they load and run fine. Any help would be appreciated.
Thanks
no subject (by simon)
post your ld program
Loading Code into Micro (by Richard Herzberger)
Here is the ld program which compiles fine but will not load. I read through previous posts and found I may need a PICkit2 programmer does that sound correct? I ordered one from DigiKey today, should be here next week. My programmer is quite old and uses software called microbrn, time for a new programmer.
(no subject) (by David R)
Hi I use PIC kit3 with no problems
Regards
David.
(no subject) (by Richard Herzberger)
Thanks this is my first micro project. I sort of thought it was my programmer but was not sure, I will have a PIC kit2 next week. I am really impressed with the ease and speed of which I was able to put together a program which even incorporated a ADC.
no subject (by simon)
hi Richard
i tested your program with a diferent pin configuration and 4mhz clock and is ok .
i used ICD2 clone with MPLAB .
no subject (by simon)
fuse setup
Help Please (by Richard Herzberger)
I received the PIC kit2 and the 18 pin Demo Board. I am trying to program a PIC16F819. I was able to install the HEX code with no errors but the the program does not run in the microcontroller, I am sure it is a configuration bit problem, The configuration bits are set to 3F42.
(no subject) (by David R)
Hi Richard,
please post the .ld file and the schematic of the demo board.
have never had any problem with any chip not running.
The fusees are set by ldmicro and are correct for most jobs.
What is the supply voltage on the demo board?
no subject (by simon)
Richard try this hex, is set for 1mhz internal oscilator and blink a led on B0 pin ( anod of LED to B0 and catod to gnd ) .
After programing the pic exit from reset mod of programmer or disconect the programmer from your board .
And what cristal you have on board ? Try with a 4mhz cristal .
My hex should work becose uses internal clock ,and need to conect a 10k resistor to Mclr pin and 5vcc .
LD file (by Richard Herzberger)
Sorry I downloaded the HEX file and not the LD file.
(no subject) (by David R)
Hi the first thing have changed the program to remove the input and hard turn on one led.
Can you post the demo board schematic.
Regards
David
(no subject) (by Richard Herzberger)
Simon and David thanks for your help, when I used the configuration bits from your example 3FF8 it worked although the timing is off by a factor of about 100. I should mention I am using a Mac and running Windows XP through Parallels program. I will have to locate a Windows machine and see if that makes a difference. The 18 pin demo board is the only one I can not locate a users guide for. But the LED's are connected to RBO, RB1, RB2 & RB3, this is a board sold by Microchip.
Thank you for your help
no subject (by simon)
Hi
Probably your schematic is this . Please ceck if is true .
(no subject) (by David R)
Have you set up the connections for the crystal?
I see in the schematic the crystal is 10 Mhz
and you have it set up as 4MHz in the program?.
I would be 99% sure the problem is the wiring of the crystal and is "RA5" pulled high ie jp5 connected and the switch open.
Regards
David
(no subject) (by Richard Herzberger)
Thank you for your help guys, the problem was in the configuration bits, it looks as though the zero position is not used in the clock settings. Once I set the clock configuration bits to positions 1-3 it worked.I also was able to get the code to work in a PIC16F886 with internal clock. The timing is now perfect.
Post a reply to this comment:
|