View Full Version : Programming UIRT2-Error or not?
gkour
October 13th, 2002, 01:55 PM
20 Mhz on the pic means it can run UP to 20Mhz. The pic will run at whatever frequency the crystal is. The 20 Mhz PIC will run with either 4 or 10 Mhz firmwares and appropriate crystals. I am guessing that the voltage on pin 4 is a little low, I THINK(not completely sure) that the programming voltage should be above 13 Volts. If the program/verify fails it is because the program writes something then imidiately reads it back, if what it reads is wrong , it gives you the fail message. And since the address of the fail is 0000 it means nothing was written on the chip. When you just programm you can't be sure it really did programm the chip.
windtrader
October 13th, 2002, 01:55 PM
Try it dude! The suspense is killing me. :D
windtrader
October 13th, 2002, 01:55 PM
I'm rooting for you !!!!! Go Jay GO JAY GO JAY!! and the crowd roars.
windtrader
October 13th, 2002, 01:55 PM
Almost there. comm port not a new problem, discussed here
http://www.girder.nl/phpBB2/viewtopic.php?t=2067
Luc
October 13th, 2002, 01:55 PM
Jay,
your Pic seems to be programmed now.
The problem was the 7V, this is a good indication for me and the cause of it is most probably a cabling issue on the RTS signal, this can also drop the level on pin 4. You have a 5V drop wich is approx. the value of ZD1 in the RTS line.
When you start the PC RTS should be at -12V (comm port closed) and pin 4 must be at approx. 0V: PIC in reset mode.
When you start Girder it will open the comm port and RTS should now be at +12V and at pin 4 you should have +5V.
Hope this helps,
Luc.
Luc
October 13th, 2002, 01:55 PM
Jay,
the fact that you get 12V when removing the zener proves there's something wrong with RTS and it's normal that programming fails in this condition because RTS is required for programming.
Can you check the cable with a multimeter and the levels of RTS as I described?
Luc
October 13th, 2002, 01:55 PM
Jay,
this must be a cable or comm port problem.
When the PC is powered up RTS must either be +12V or -12V depending if the comm port is open or closed, not something in the range you have.
Check the cable for open connections or shorts (or buy a new one). Also try another comm port.
Luc
October 13th, 2002, 01:55 PM
Now it becomes difficult...
Normally there's nothing to configure in the BIOS, Auto just means that the BIOS will assign the I/O addresses automatically, this should work.
Are you 100% sure that the cables you use have all pins connected "pin to pin"? The levels you measure on RTS are certainly wrong so we must be overlooking something obvious......
One last thougt: are you using a female DB9 on the PCB and a male-female extender cable? This is how it must be done.
Once the programming works, the rest should work also. But you can use a cable with txd, rxd and ground only for normal operation.
Jay Wilson
October 13th, 2002, 01:55 PM
I have built the UIRT2 (actually 2 of them now) and I keep getting an error while programming. I get "Programing Error at 0x0000"...not sure hoe many zeros, but it was 4 or 5. Anyway, this is as soon as I hit the OK button to start the programming. I am using the 1.7 version of the software and the 10MHz hex file. I got this on the 1st one I built, so I built another and tried it. Same results.
Last night, I decide to change the box that says "Programming/Verification" which by default ahs its radio button selected, to "Programming". My assumption was I would get the same error. Well, it appears the programming worked. I got the status bar at the bottom and afterwards I got the programmign complete message to remove the shunt and the 12v.
I haven't soldered in the crystal yet to actually test becasue I want to make certain that what I did or the messages I received were correct.
Can anyone comment?
Jay Wilson
October 13th, 2002, 01:55 PM
I guess I will tonight. I have to pick up a crystal on the way home. The one I ordered was the wrong mounting type.
I assume from your answer that there is no risk of blowing something up? :D
Jay Wilson
October 13th, 2002, 01:55 PM
Well apparently it is an error. I programmed it, put in the crystal (I ended up reprogramming for a 4MHz as that was all I could find locally) and tested. No joy.
I downloaded the plugin, installed and made it active, and it says that "plugin is active but hardware failed to initialize." :(
I seem to remeber reading that someone had problems with a programming program but I don't remeber which one and I can't find it now. Is there another file that would allow me to program the chip that might have better luck with?
TIA!
Jay Wilson
October 13th, 2002, 01:55 PM
OK guys, I really am lost. Is the UIRT really finicky? Is Girder? I have the utmost respect for you guys that developed the 1st one of these. My frustration level is so high right now from just getting one to work...I can imagine what happens when creating. Without repeating the above, I thought I had it but not sure.
1. i can only program if Ido not use verify.
2. I can openand use the tester, and it appears all is working. The tester registers the UIRT on COM2
3. When I start Girder, it says that plugin loaded but hardware initialization failed.
4. I have verified that the port settings in Girder are correct.
5. I have shorted the crystal, and reprogrammed jsut on a whim.
6. When I 1st start Windows (or Girder if I close it) The 1st thing I get is an error saying "cannot read 1st character" If I disable the UIRT plugin, and restart Girder, no error. So I know something is wrong but I don't know where.
This is my 1t attempt at a device like this and I am not nearly as technical as most of you guys here, but you all make it sound so easy I don't think I should be having this much trouble. I have read all the threads I have found that have to do with programming, and there were others in the same boat, but there was never a concrete solution posted.
Anyone got any ideas?
And just for safetys sake, I did verify and reverify my components, their irientation, etc., etc. I also verified 12v on pin 4 of the PIC.
Jay Wilson
October 13th, 2002, 01:55 PM
OK. Maybe I found a problem. When I ordered parts, I went exactly by what was printed in the parts list. I order a PIC16F84A-20/P from DigiKey. Well, I just looked at the data sheets, and that 20 in the part number means 20MHz. Maybe a dumb question, but shouldn't the PIC run at the same frequency as the crystal and whatever we are programming with? I have just ordered a PIC16F84A-04/P (4MHz) and a PIC16F84-10/P (10Mz and I hope the "A" is a minor difference as they didn't have that version in a 10MHz. I'd hate to think this is what all my frustration has been over, but I feel that when these new parts come in I'll know for sure. Feel free to comment if I'm way off base here. :)
Jay Wilson
October 13th, 2002, 01:55 PM
Thank you for the explanation. I have already checked pin4. I was told it needed at least 12v to program. I actually have 14, but since it was "at least 12v" that's all I reported. The 0000 error is what I am getting so nothing is ever getting written? How can the test program verify that there is something connected to com2 with nothing on the chip? Or am I using the test program incorrectly? Thank you for your helP!
Jay Wilson
October 13th, 2002, 01:55 PM
I've dug a bit deeper, and if I can't figure it out from this, I'll have to look into something different to control my IR equipment. It really shouldn't be this hard :( Anyway, after gkour's post above, I really started measuring voltage...everywhere.
I cleaned all solder off, and resoldered all components on the board. I went back and checked, and only 7v at pin 4. Hmmmm. 5v less that the 12 it should be. So, I applied a direct 12v to pin 4, and it programmed/verified perfectly.
I loaded Girder, and I still get the message "Cannot read 1st character." so obviously something still wasn't right.
So I went back to measuring for 12 v...On the input side of R3 and D1, I have 12v. Good. On the backside of both of them, it drops to 7v. So the 1st component in line is dropping the voltage. So I replace the diode thinking maybe its bad. Same problem...7v. It is exactly the IN4148 as specified.
Obviously D1 is the culprit, and I have verified it is installed correctly. I even put it in backwards (of the schematic) and I now have 12v at pin 4, but still have programming errors, but I expected them this time.
Anyone want to help point me in another direction? I'm about ready to give up...I don't want to, but I am so frustrated right now it's unreal!
WHew...Thanks for letting me vent a bit!
Jay Wilson
October 13th, 2002, 01:55 PM
Actually no. I still can't get it programmed and have thought of emailing you. Don tried to help, but he was starting to think maybe a software issue. I still have 7v at pin 4, unless I remove the zener then I get 12v when I start to program. But it still won't program. I still get there 0x00000 error as soon as it starts.
Should I maybe check something on my com port? I am using a standard (not null) cable from the com port to the UIRT. I can connect the same com port to my projector, lighting, and receiver without any problems so I think the port is oK. unless there is somethig that the UIRT doesn't like.
Jay Wilson
October 13th, 2002, 01:55 PM
Sure, I will check tonight. Just to make sure I am doing the right thing...
Leave the UIRT in "normal mode"...no 12v applied.
Start the PC...RTS should be -12v...pin 4 pf PIC is 0v
Open Girder...RTS should go to 12v...piv 4 of PIC should be 5v
That should about cover it...I will post my results tonight. Thanks for your help, I so much want to get this working!
Jay Wilson
October 13th, 2002, 01:55 PM
Luc, When i start the PC, RTS which should be pin 7 is steady with .3V. When I start the programming (attach 12v and move jumper) it goes to 2.25v. Pin 2 stays at -10.5v. I am testing on the solder connection on the actual UIRT board. during programming (or attempts to) pin 4 of the PIC is still at 7v.
I hope this tells you more than it tells me :) which is basically that I need someone else to tell me what is wrong because it is bbeyond me :D
Jay Wilson
October 13th, 2002, 01:55 PM
Luc,
3 different cables and 3 different computer...same results.
In each case, the 9 pin com port that I am using is built onto the mobo. I can configure it in the bios. Is there a specific "type" serial port that would make a difference? Currently it is set to auto.
I do rs232 programming at work all the time, but we are only concerned with pins 2, 3, 5...never pin 7 so I don't know what happens here. I have never done an ICSP like this. I can connect my other equipment and control it with ASCII or HEX strings no problem from the same port using the same cables...but again, only concernced with pins 2, 3, 5.
Any other ideas?
And lastly, if/when I get it programmed, am I going to have trouble operating it through these com ports? Or is it still concerned with the RTS line after it is programmed?
Jay Wilson
October 13th, 2002, 01:55 PM
One last thougt: are you using a female DB9 on the PCB and a male-female extender cable? This is how it must be done.
Ah ha! I am using a male 9 pin on the UIRT which is the same as on the mobo. I am then using a female to female straight thru (pin to pin) cable. Are you saying this will make it "not work?" It shouldn't matter as long as pin 7 is in the same place...or would using a male put everything off.
You may have just made my day! :D I really hope it was something "this stupid!"
Jay Wilson
October 13th, 2002, 01:55 PM
HE SHOOTS...HE SCORES...HE GOES FOR THE ENDZONE DANCE....
DENIED!
Well progress anyway. It's amazing how well these things work if you put them together the right way...thanks Luc and Don.
New problem...It programmed fine, I removed the 12v, put the jumper back, downloaded the plugin to the correct directoty, started girder, selected the plugin, adjusted teh settings, and when I enable the input devices, I get a long pause (15-20 sec) and then it says "cannot set comport speed"
At least its progress! Any thoughts on this one?
Oh, and in the settings window it says "plugin in loaded in memory but hardware initilasation failed."
Jay Wilson
October 13th, 2002, 01:55 PM
I read that entire thread twice and it didn't help me. I'm going to rig a 2, 3, 5, pin cable tonight to see what happens. That was the only thing that I think it could've been. My concern is if it "can" work with all pins connected, then the 2,3,5 wire cable is a band aid only...makes me think there is something amis. Will try later this evening!
What happened to my cheering section? :)
andybryant9
December 8th, 2002, 03:11 AM
I solved it in this thread
http://www.girder.nl/phpBB2/viewtopic.php?p=16674#16674
Hint - turn hardware flow control on in Windows for the serial port.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.