I'm trying to programm my PIC 16F628A with PICKIT3 in MPlabX, but I get the following error:
***************************************************** Connection Failed.
When I enable the "Power Target Circuit From Tool", I get another error:
The target circuit may require more power than the debug tool can provide. An external power supply might be necessary.
Connection Failed.
So a provided an external power supply of 5V and my PIC 16F628A is draining 10mA, despite nothing is connected, only the PICKIT3 to the MCLR, ICSPDATA and ICSPCLK pins of PIC.
I'm using Ubuntu 16.04, MPlabX IPE V4.05., and
PS: Yes, I know how to read a datasheet.
PS: Circuit and PICKIT3 works properlyt if I connect to PICKIT3 Programmer running on Windows 7.
The first issue can sometimes be resolved by shutting down MPLABX, disconnecting the PicKit from your computer and reconnecting everything. Seems the firmware and/or driver sometimes gets in a weird state and needs a good boot to get going again. I sometimes have to reboot my computer just to program my main board (Major PITA).
The second issue is not necessarily caused by an over current despite the message. I always got this error when my PicKit was plugged into an unpowered USB hub. It seems the lower USB bus voltage confuses the PicKit into thinking that the device is the cause for the voltage drop instead of the host simply not supplying the normal voltage. Try plugging it into a powered USB hub or directly into your computer.
I know this is an old topic but maybe this answer can help somebody else.
I use as well official PICKIT's as clones.
It could indeed be caused by a hardware issue.
E.g. short or already activated load like a bunch of LED's.
Disconnect all loads if possible.
When using an official PICKIT 3, this issue is often solved by setting the voltage your PICKIT should supply to a lower level e.g. 5 => 4.625.
In MPLAB go to the properties of your project.
Select PICKIT on the left.
Select Power from the selection dropdown at the top.
When you have a SURE electronics clone, this might do the trick. (Maybe this is also valid for other clones) The AMS1117 they used is the adjustable one.
They used a 680 and a 470 feedback resistor which gives a voltage of 3.09V ((680/470 +1))*1.25 + 50u * 680). If you swap the 680 Ohm resistor with a 750, the output will be closer to the probably desired 3.3V.
Source where I got the idea: https://jrainimo.com/build/2018/12/picfix/
Location FB resistor
Close MPlab, reconnect Pickkit, restart MPlab worked for me.
If you've just created a new project or created a new file, MPlab sometimes confuses some things.
Related
I am trying to add a simple led application to a PIC18F25Q10 in another circuit using the Curiosity HPC development board. I am using the MCLR, PGD, PGC and GND pins. Although I set the LVP mode to enable in the CONFIG settings and the program speed to low in the project properties, MPLAB " MPLAB has detected that the undervoltage configuration bit on the device is off and you have selected" error output . I also cannot connect to the PIC.
My MPLAB version is 6.5
I am using the X8 compiler (2.40).
I am throwing code with PKoB4.
I checked my circuit connections and confirmed that the MCLR, PGC and PGD pins were correct, but I kept getting errors.
I have done the steps to be applied here, but I have not reached a result. I cannot connect to the PIC.
Connecting to MPLAB PKoB4
Currently loaded versions:
Application version...........00.05.79
Boot version..................01.01.41
Script version................00.05.35
Script build number...........86fedc5c2e
Tool pack version ............1.8.869
Target voltage detected
MPLAB has detected that the low voltage configuration bit on the device is off and you have selected the low voltage programming option on the debug tool's property page. If you wish to use the low voltage programming option you must first do the following:
* Turn off the low voltage programming option on the debug tool's Program Options property page
* Program the low voltage configuration bit to on
* Turn on the low voltage programming option on the debug tool's Program Options property page
Connection Failed.
I checked the forum pages and updated MPLAB and the PKoB4 drivers to test the information that it might be version related, but I could not connect to the PIC.
I used another circuit because I thought there would be a problem with the PIC. I got the same error. I tried to load the code from another computer and I continued to get the same error.
I tried to code with ICD, it codes. However, I could not solve this error on the Curiosity HPC development board. I came across some information in the Curiostiy development board user's guide.
information Image..
I need to be able to connect to the PIC and throw code. I am curious about your thoughts and advice about my problem.
According to the advise of MPLAB your PIC chip has programmed to have LVP disabled. The curiosity boards has a built-in PICKIT which can program only in Low Voltage Programming mode. So you have to do the following steps:
Get a standalone PIC (i.e. PICKIT3) programmer
In config settings of your PIC set the LVP to be on
In MPLAB IDE, File > Project Properties > PICkit 3 > Program Options make sure that Use low voltage programming mode entry option is unchecked
Burn your PIC device with this configuration once using the standalone PICKIT programmer
These steps will prepare your PIC so that it can be programmed in curiosity board. Once you done with all steps correctly, you will be able to burn your programs using your curiosity.
When you program with the built-in programmers, you always wanna make sure that your PIC is programmed before with configuration LVP = ON. And also keep this config bit always ON as long as you keep programming it in a curiosity board.
One more thing to tell, MPLABX is automatically checks the Use low voltage programming mode entry option when you select the Connected Hardware Tool as your curiosity board.
Go ahead and try the steps and then let me know if I could help any further.
I will ask a question about my STM32F407 Discovery board. I want to learn about external interrupts and I was making a small circuit. I connected PH0 to my button and PH1 to the LED. But these pins are connected to the mcu's crystal pins. But I didn't know it at that time. I was press button that is connectet to 5V. And my IDE won't connect to my board for debugging debugging. I can connecting to my board via ST Link Utility and I can do a full chip erase with no errors. Then I turn back to code in Atollic, press the debugging button and I get this error messages:
Error in executing 'cont' command ...
CM4 Failed to read all registers
FAILED to REGISTER Values from the target
Target is not responding, retrying...
*some messages in between*
warning: Remote failure reply: E31
Remote failure reply: E31
Remote connection closed
Quit
And then I turned off the debug screen to try again but I can't because Atollic can't find any ST Link devices. This is the error message:
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
Note: My PC recognize my board in Device Manager.
How can I solve this problem. ST Link Utility connects to my board succesfully, My PC connects to my board. I tried St link firmware upgrade but I got more errors. Like this.
Failure at line: 13 in "Target Software Startup Scripts"
You probably have ST Utility still connected to your MCU. This results in Atollic not beeing able to connet to the MCU. Either close ST Utillity or press the disconnet button.
Since you can erase it your MCU should be ok and you chose one of the few 5V tolerant pins but it would be better practice to use 3V.
Another reason might be the option bytes if the read out protection got set to level 1 or 2 the debugger is sometimes not able to reset those and is therefore not able to read out the register.
I was solve a lot of problem. Firstly I found a problem. This is a my DCMI_Config function. In this function I have a lot of pin definition. GPIOA caused my problem.
GPIOA-> MODER = 0x00002200; //GPIOA 4,6 Set Alternate Function for DCMI
This line has my problem. I was search Discovery schematic and I found something. PA4 pin connected to Discovery's voice uc as I2S3_WS. Is this cause any problem?
We are using progisp software to program a microcontroller AT89S52. We are struggeling with an issue saying
chip enable program error
Please help us to tackle this issue? What does it mean?
According to https://alselectro.wordpress.com/2019/03/30/usbasp-solution-to-chip-enable-error-firmware-upgrade/ it might just be a physical connectivity issue (or the wrong chip:
CHIP ENABLE error occurs if the IC is not placed correctly on ZIF socket of development board or if the wrong Chip is selected.
Did you checked all the things which are described in this documentation https://www.academia.edu/8278452/How_to_solve_chip_enable_program_error_in_progisp?
Check if the
USBasp
driver is properly installed (update it from settings).
Recheck the jumpers. Change them if they are weakly connected.
Try to change the port, sometimes some ports can malfunction (ex. from port 1 to port 0).
Press reset button for 10 seconds.
Try to erase current program from
progisp
compiler, and load flash of hex file again
Or here: http://www.mbeddedc.com/2015/03/how-to-solve-chip-enable-error-in.html
Reason for Chip enable error in progisp:
1) Main reason for this error could be wrong connections.
This can be solved by checking the connection between Serial ISP Programmer and Micro-controller. Many times Gnd,Vcc,Sck,MISO,MOSI,RST connection does not match with each other. This should be given properly by Gnd-Gnd, Vcc-Vcc, Sck-Sck, MISO-MISO, MOSI-MOSI, RST-RST.
2) Check whether the power to the ISP Programmer and micro-controller are correctly supplied.
It pretends to solve the issue.
My problem pertains module ESP8266, specifically version ESP-01.
When I have uploaded firmware (nodemcu) to the module then it works all right.
But later, I found out that the module is not responding. Even after so much restarts.
In addition, the led on the module shines/ligths very weakly.
I don't know where is the problem. Maybe with power supplying but I am using usb-to-serial converter which provides 5V as well as 3V. In addition I am using a voltage regulator from 5V to 3.3V because I wanted to be sure.
Thank you very much.
The problem is that most usb-to-serial interfaces can't provide enough current for the ESP8266 which could draw peak currents of about 320mA. You must use an external power supply.
Okay I am going to try and be as discriptive as possible here to get this problem solved. I work at a company that makes BIG gear boxes and we have computers that run our Mills/Laths. These computers are currently FIT-PCs running XP. These computers are used to control the laths/mills via a usb to serial converter (PL2303_Prolific usb to serial converter). When it is plugged into an xp machine it is recognized as a com port. SO these machines are very old and are fail left and right, I intend to replace them with a raspberry pi running xfreerdp but I can't seem to get the usb serial device to be redirected to the virtual machine it is remoting into. Has anyone ran into this/know a fix for it? Please ask me questions if you are unsure of something because I am completely stuck here. TLDR Using raspberry pis as thin clients need to push a usb 2 serial cable through to the virtual xp machine
Unfortunately there are known issues with USB on Raspberry Pi. They're aware of the issue and working on it, but it is as of yet unresolved.
The USB Redux thread was created to capture the state of the work as well as the current list of work-arounds. The USB/serial converters are broken is a related thread.
There is hope, however. First, they are working actively to fix it, so I suspect it's just a matter of time. Second, there are a few things you can try.
There's a config file in
/boot/cmdline.txt where you can try adding a few entries. One that appears quite effective is dwc_otg.speed=1 and dwc_otg.fiq_fix_enable=1 (but they didn't help me). See this page for some examples.
Update the kernel (search for rpi-update) to at least #348 (use uname -a to determine the kernel level)
Good luck.
Update (Mar 13 2013). There appears to be a fix for the majority of USB issues as of kernel #389. Use rpi-update to update.