From: Frans S. <fra...@gm...> - 2008-10-28 07:14:51
|
Well, I tried it with piklab 0.15.2 and 0.15.1 before, never with 0.15.3. Maybe you should try the older versions of piklab Have you mentioned that you have to invert the MCLR line? Have you measured the voltages on the PGD, PGC and MCLR with the PIC connected? it shoud be 0v/5v, 0v/5v and 0v/12v Did you connect a proper 12v power supply? If you still fail, I can send you a programmed PIC18F2550. Cheers, Frans > Hi, > I'm having troubles programming the PIC18F2550 with the bootloader: I've > built (actually, on a breadboard) the JDM programmer as suggested in the > website of UPP. > > However, using Piklab 0.15.3, when I try to clear the configuration bits of the > PIC (after a warning saying me that the programmer does not support selective > erasing and that all PIC memory will be cleared), piklab hangs forever. > > If instead I try to program the code memory it says: > > ------------- > Programming device memory... > protected: code=false data=false > Writing memory: Code memory > start before align: 0 > start after align: 0 (align=16) > end before align: 949 > end after align: 959 (align=16) > start=0x000000 nbWords=0x0003C0 total=0x004000 force=false varOffset=true > varSize=true > Verifying memory: Code memory > start=0x000000 nbWords=0x004000 total=0x004000 force=true varOffset=true > varSize=true > Device memory does not match hex file (in Code memory at address 0x000000: > reading 0xFFFF and expecting 0xEFA0). > ------------- > > My setup is: > - breadboard with JDM programmer connected to the serial port, to an external > 12V stabilized power supply and to the P2 connector of my UPP > - UPP connected to the JDM programmer and to the USB port of the PC (for power > supply) > > If I sense (without running piklab or any other app using the serial port) with > a voltage meter the base of the BC547 transistor on the JDM programmer (that is > approximatively the voltage level on the pin 3 of the RS232) I read -10.8V. > > On the UPP's PIC I read 5.17V on Vdd (pin 20) and 11.8V on MCLR (pin 1); on PGD > and PGC lines (pin 28 and 27) I read respectively -0.5V and -0.8V... I think all > these readings are ok... > > I think however the programmer isn't working correctly because if I compile > latest SVN version of UPP_WX and run it (as root) and then do 'Actions->Connect > bootloader' I get: > > ------ > USB debug enabled, remove #define USB_DEBUG 10 in hardware.cpp to disable it > usb_set_debug: Setting debugging level to 2 (on) > usb_os_init: Found USB VFS at /dev/bus/usb > usb_os_find_busses: Found 005 > usb_os_find_busses: Found 004 > usb_os_find_busses: Found 003 > usb_os_find_busses: Found 002 > usb_os_find_busses: Found 001 > usb_os_find_devices: Found 001 on 005 > usb_os_find_devices: Found 001 on 004 > usb_os_find_devices: Found 001 on 003 > usb_os_find_devices: Found 001 on 002 > usb_os_find_devices: Found 005 on 001 > skipped 1 class/vendor specific interface descriptors > usb_os_find_devices: Found 004 on 001 > skipped 1 class/vendor specific interface descriptors > skipped 1 class/vendor specific interface descriptors > usb_os_find_devices: Found 001 on 001 > error obtaining child information: Inappropriate ioctl for device > error obtaining child information: Inappropriate ioctl for device > USB debug enabled, remove #define USB_DEBUG 10 in hardware.cpp to disable it > usb_set_debug: Setting debugging level to 2 (on) > ------ > > I think this is normal because 'lsusb' says: > > ----- > Bus 005 Device 001: ID 0000:0000 > Bus 004 Device 001: ID 0000:0000 > Bus 003 Device 001: ID 0000:0000 > Bus 002 Device 001: ID 0000:0000 > Bus 001 Device 005: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical > Bus 001 Device 004: ID 046d:c309 Logitech, Inc. Internet Keyboard > Bus 001 Device 001: ID 0000:0000 > ----- > > that is, the PIC seems unprogrammed :/ > > > thanks for any hints, > Francesco > > |