Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Programming the PIC

  1. #1
    Join Date
    Jul 2007
    Posts
    14
    Post Thanks / Like

    Default Programming the PIC

    Help needed programming 18F4525.

    After several failed attempts at programming the 18F4525 IC on a breadboard, I bought a JDM programmer off E-Bay.
    I need help with settings in WinPic800 for the hardware and software. Here is a link to a one like the one I bought.
    http://cgi.ebay.com/Enhance-JDM-PIC-...QQcmdZViewItem

  2. #2
    Join Date
    May 2007
    Location
    Tulsa, Ok
    Posts
    428
    Post Thanks / Like

    Default

    First, the serial port MUST be hardwired. A USB to RS232 will not work.

    Check your shunts on the programmer. There is a file on the CD you got with the programmer that contains the shunt positions (see below). Pin 1 should be beside the little lever on the programmer.

    Check to see if the PIC 18F is selected in the upper right corner of the screen. Also 18F4525 should be selected.

    Load the HEX file. Be sure to get the right file (sink or source) depending on the SSR's you are using and how the LEDs were installed. The window should look like the one below (see below).

    Select "DEVICE>HARDWARE TEST" and it should be OK.
    Select "DEVICE>DETECT DEVICE" and it should find the 18F4525.
    Select "DEVICE>PROGRAM ALL" and it should be successful.

    Tonight, I hooked up my JDM programmer, set up the shunts, loaded my .HEX file, programmed a blank 18F4525, and tested it in a field module. It worked perfectly.

    There is no special software setting needed.

    Let me know if I can help further.
    Attached Images Attached Images

  3. #3
    Join Date
    Jul 2007
    Location
    Houston, Texas
    Posts
    124
    Post Thanks / Like

    Default

    I have the same programmer as you. I did not program this chip but I successfully programmed the 16f688. Here are the notes I compiled on PIC programming; I think some of it will apply to you.

    http://www.doityourselfchristmas.com...oad.php?id=193

  4. #4
    Join Date
    May 2007
    Location
    Tulsa, Ok
    Posts
    428
    Post Thanks / Like

    Default

    Don't worry about compiling the code again, just use the .HEX files I have provided.

  5. #5
    Join Date
    Jul 2007
    Posts
    14
    Post Thanks / Like

    Default

    Thanks for the reply FireGod. When I did a hardware test with the chip in, it comes back with hardware not responding. If I take the chip out it is ok. I put the chip in and did a “detect device”, and it found the I.C. I went ahead and programmed the chip and it did complete and was able to verify the flash. I flashed it with the +5vdc turn on file. I connected the controller and 1 field module, and I don’t get any of the LED’s on the field module to light. I don’t understand what you are saying about installing the LED installation? I am planning on using the SSR’s that I used last year from my Olson 595 setup. I currently have both dimming and non-dimming triac/SSR’s.
    From what I can figure out, on the field module, the RJ45 jack by pin 1 of the 18F is channels 1-4; Also will the LED’s on the field mod light with no SSR’s connected? Is there any special COM port settings that need to be addressed, or is default ok. Thanks in advanced

  6. #6
    Join Date
    May 2007
    Location
    Tulsa, Ok
    Posts
    428
    Post Thanks / Like

    Default

    With respect to your SSR's, do you ground a channel circuit to turn it on (sinking) or do you apply a +5VDC signal to the channel circuit to turn it on (sourcing)? If you installed the optinal LEDs on the field module, the polarity MUST be correct for your SSR configuration. LEDs for sinking would be the LED + to the SSR and the - to the 18F4525. Sourcing would be LED + to the 18F4525 and the - to the SSR.

    The LED's will not light unless a SSR is connected. The SSR completes the circuit.

    With the sinking type of SSR, the module address is selected by NOT INSTALLING a shunt on the desired address. Install shunts on the other three selections.

    With the sourcing type of SSR, the module address is selected by INSTALLING a shunt on the desired address. Do not install shunts on the other three selections.

    Channels 1-4 are the RJ-45 near pin 1 of the 18F4525.

    The default port settings should be fine, the com port number setting is up to you. You will need to identify it in the Windows Control Panel>System>Hardawe>Device Manager>LPT and Com ports.

  7. #7
    Join Date
    Jul 2007
    Posts
    14
    Post Thanks / Like

    Default

    Thanks for the quick reply. The way everything ran last year was ground was applied to turn on a channel for both my SSR’s I’ll have to double check my Triac/Opto modules. So far I only soldered in 8 LED’s to the field module. I placed them in the direction of the silkscreen; - to the 18f4525, so I should be ok there.
    I flashed the chip last night with the wrong flash(sourcing). I did another one this morning with the sinking flash, I’ll try that one later tonight. Thanks again for the help.

  8. #8
    Join Date
    May 2007
    Location
    Tulsa, Ok
    Posts
    428
    Post Thanks / Like

    Default

    Be sure to follow the below instruction:

    With the sinking type of SSR, the module address is selected by NOT INSTALLING a shunt on the desired address. Install shunts on the other three selections.

  9. #9
    Join Date
    Jul 2007
    Posts
    14
    Post Thanks / Like

    Default

    OK, a quick initial test of the system and it appears to be working (sort of). I terminated one channel with an LED (just happened to be third one for the RJ45, I.E. channel 3 or channel 7 or 11 Etc.) I ran one of last year’s sequences and I was seeing activity; the only problem is it is flashing/pulsing instead of being solid :? . Any suggestions? I can selectively test the individual channel with the test channels feature and it is working, pulsing, but working. One more step forward :D .
    I used the controller, one field module with NO shunt in place. 1 hacked patch cable with 1 LED

  10. #10
    Join Date
    May 2007
    Location
    Tulsa, Ok
    Posts
    428
    Post Thanks / Like

    Default

    50hZ or 60Hz?

    Without shunt(s) the module address might be any module address.

    Check to see that the Zener diode is installed correctly.

    I assume your 12 volt power supply is AC, not DC.

    Be sure to put a limiting restistor in series with your LED. I use a hacked patch cables with only 510 ohm resistors, no LEDs other than the ones on the field module. Without a limiting resistor, it may be drawing too much amperage causing a low voltage at the I/C. This is the most likely problem.

    Check the +5VDC voltage at the field module while the sequence is running. It should be a consistant 5VDC or close to it (4.8 or 4.9).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •