From: Matthijs K. <mat...@st...> - 2010-05-29 12:31:44
|
Hi, when creating a few initial testing programs, I've been suffering from the "Hardware should say OK" error message. After some investigation, it seemed as if some hex files would consistently trigger this message, while others would consistently work. Some more investigation shows that is the case that the working programs work _most_ of the time, but not always. I've attached two examples of a program that works most of the time (around one in 10 tries failed so far) and another that failed on every try so far. This was on a 16f876, using a Windows system with usbpicprog 0.4 and brand new usbpicprog hardware. When the programming fails, I have to replug the programmer and restart the usbpicprog application. On a Linux system, both of the attached programs fail every time (while a blinking led example does work). The examples include a hex file, together with the .mbas (MikroBasic) file and (intermediate) assembly file that they were generated from. On a related note, I'm also seeing errors when erasing every now and then on the Windows system. On the linux system, these have occured every time so far (until I disabled "Erase before programming" to make things work). Not sure if this is related, but I think it is. Can someone try if these programs are ok or broken for them? It seems that something in the actual hex code that somehow triggers a (timing) bug in the usbpicprog firmware. From these examples, you might suspect the length of the program is relevant (the breaking program is slightly shorter), but I've also seen breaking programs that are way longer. I've also tried to use a shorter USB cable, but that didn't seem to matter much (initially, the problem seemed to increase, but that evened out later on). Any suggestions on how to debug this problem? Gr. Matthijs |