From: Francesco M. <f18...@ya...> - 2008-10-27 16:37:46
|
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 -- |