Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 6th March 2007, 01:29 PM   (permalink)
Default

Quote:
When you programmed the 877 to blink a LED did you run it in the inchworm circuit ? If not write code to blink busy LED and check it in inchworm.
i write the code and feed it to the PIC, now the programmed pic is running fine on my Develpment board, it is blinking LED connected at PORTB.3.
But when i insert the same PIC into Inchworm it not blink LED.
But when i apply direct 5 volts to PORTB.3 in Inchworm IC's Socket then LED turn ON.
As i understand this is because MCLR/VPP pin is not pulled up with any resistor to positive supply in Inchworm.

Quote:
Do you have the PIC - MAX232 - DB9 exactly as in the inchworm schematics ? Check this again even if you had the LED blinking.
It is giving exact voltages on test points.
5 Volts on TP+5 And
12.8 Volts on TP VPP.
5 and 0 volts on IC socket of PIC16F877A at VDD and VSS.

Quote:
I think the "serial input/output" is part of the CCS IDE not the compiler. I have the compiler but not the IDE not sure exactly what it does so I do not know what that test proved for sure.
I have test my RS232 cable and MAX232 at both speeds 57600 and 19200 they r right....... I use "Input Output monitor". It is not a complier, it is just like a Terminal program comes with PICC compiler...
Ayne is offline   Reply With Quote
Old 6th March 2007, 01:40 PM   (permalink)
Default

Have you got LVP enabled in the config?

Mike.
Pommie is offline   Reply With Quote
Old 6th March 2007, 02:35 PM   (permalink)
Default

Quote:
Have you got LVP enabled in the config?

Mike.
I don't understand, plz explain.
Ayne is offline   Reply With Quote
Old 6th March 2007, 02:38 PM   (permalink)
Default

You mean during the feeding of Firmware(ICD2_Bootloader_A.hex) into PIC16F877A???
Ayne is offline   Reply With Quote
Old 6th March 2007, 03:01 PM   (permalink)
Default

Quote:
Originally Posted by Ayne
You mean during the feeding of Firmware(ICD2_Bootloader_A.hex) into PIC16F877A???
when programming the "target" chip ,
there are configuration bits (in the target chip memory) that need to be set

depending on the type of osillator the Target will use , you eithe set the config bits, to HS high speed , internal , or a few other options.
LVP is another option set in the config bits.

the config bits are set by either MPLAB or in the assembly program itself.
i forget the syntax of the assembly code for the config bits , BUT each target chip has its own , config bits , and they are different , mostly.

What is your target chip?
williB is offline   Reply With Quote
Old 6th March 2007, 04:16 PM   (permalink)
3v0
Default

Anyone reading this should note that this is a handbuilt inchworm board not an inchworm kit. To ensure the processor has everything it needs to run we are programming a pic to blink the busy LED on the inchworm.

Quote:
Originally Posted by Ayne
i write the code and feed it to the PIC, now the programmed pic is running fine on my Develpment board, it is blinking LED connected at PORTB.3.
But when i insert the same PIC into Inchworm it not blink LED.
But when i apply direct 5 volts to PORTB.3 in Inchworm IC's Socket then LED turn ON.
As i understand this is because MCLR/VPP pin is not pulled up with any resistor to positive supply in Inchworm.
For this to work you must have programmed the PIC for use with a HS osc. I assume this is not a problem.

Try hooking a 10K resistor between positive and PIC pin 1. That should pull it high as needed.

Finsh this test. get it to blink then look at the RS232 if there is still a problem.

Quote:
I have test my RS232 cable and MAX232 at both speeds 57600 and 19200 they r right....... I use "Input Output monitor". It is not a complier, it is just like a Terminal program comes with PICC compiler...
It is good that it worked buy you still need to check/inspect/(look at) all the wires/connections between the Inchworm PIC the MAX232 and the RS232 connector on the inchworm.
3v0 is offline   Reply With Quote
Old 6th March 2007, 04:29 PM   (permalink)
Default

Many people here got blank Inchworm PCBs from contest entries and such, so its not uncommon. Attached is the 16F877A Inchworm firmware with OS preloaded. And make sure LVP is off when using your TAIT or put a 1K resistor between RB3 and GND on the Inchworm (and then program another 16F877A with the Inchworm) use it and remove the resistor. This will disable the Busy LED but your Inchworm should run even if the chip was programmed with LVP enabled.
Attached Files
File Type: zip Inchworm16F877A with OS.zip (11.3 KB, 6 views)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 6th March 2007, 04:33 PM   (permalink)
Default

Now i tell you from start(I have read the Inchworm ICD2
Assembly Instructions).
1. I received the PCB of Inchworm from BlueRoom electronics free.... without components..... only only PCB.
2. I bought all the components from local market(PIC16F877A etc etc)
3. I assembled then and do some soldring..
4. I checked my PCB it is looking ok... then i apply electrical power to it.
5. I test PCB at Test Points, the reading are
5 Volts on TP+5 And
12.8 Volts on TP VPP.

6. For checking Serial Cable(RS232) and MAX232, i use a simple terminal program called "Input Output monitor" comes with PICC compiler. I short
RC7 and RC6 with a jumper on IC socket of PIC16F877A on Inchworm, i send some data from Terminal, terminal receive same data which i was sent a few micro seconds ago. I remove the jumper from socket and send data again and no data received. It means my cable and MAX232 is right and working corectly.


7. I have another programmer (TAIT Serial Programmer) and it is working... I feed a simple program blinking LEDs into PIC16F877A and for checking that Microcontroller is right...... OO yes. LEDs are blinking on my another develpment board.

8. Now i erase my previous program(blinking LED) and feed a new program "ICD2_Bootloader_A.hex" into PIC16F877A. it programmed successfuly.

9. I turn OFF FIFO of both COM1 and COM2.. and restart my computer

10. I push PIC16F877A into Socket and connect it with Serial port cable.

11. Run MPLAB.

12. I selected ICD2 from programmer menu. and run ICD wizard.

13. I press the connect button but it says
Quote:
Auto-connect not enabled - Not connecting (Try enabling auto-connect on the ICD2 settings pages.)
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
ICDWarn0054: MPLAB IDE has lost communications with the MPLAB ICD 2. Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
What is worng i have done???
Ayne is offline   Reply With Quote
Old 6th March 2007, 06:17 PM   (permalink)
Default

Quote:
Auto-connect not enabled - Not connecting (Try enabling auto-connect on the ICD2 settings pages.)
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x71, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Running ICD Self Test
...Passed
Thanks to Lord Allah....
Problem solved...
Bad crystal....
Thank u answering.

In my view crystal should be little above from PCB surface.... I mean crystal not touched with PCB surface....
Ayne is offline   Reply With Quote
Old 6th March 2007, 06:29 PM   (permalink)
Default

i too was getting #21 error
untill i got my ICD2 oscillator working.
have you got another clock source available?

i used a 100 ohm resistor , neither part was damaged.
and i touched pin 13 of the F877 on the ICD2 board , and clicked connect at the same time , and it worked.

EDIT of course the two grounds have to be connected also
Attached Images
File Type: jpg pic fix.JPG (39.2 KB, 6 views)

Last edited by williB; 6th March 2007 at 06:47 PM.
williB is offline   Reply With Quote
Old 6th March 2007, 07:30 PM   (permalink)
Default

Quote:
Originally Posted by Ayne
In my view crystal should be little above from PCB surface.... I mean crystal not touched with PCB surface....
Quite right, not too snug as most crystals have metal bottoms that may short out against the pads on the PCB. Some series cut crystals may overdrive the PIC, I'll look into ones that work and post a digikey part number in the assembly manual.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 6th March 2007, 11:54 PM   (permalink)
3v0
Default

Quote:
1. I received the PCB of Inchworm from BlueRoom electronics free.... without components..... only only PCB.
I did not know you had the PCB. Was thinking you were hand wiring it. That is why I was so concerned with the RS232=MAX232=PIC wiring.
3v0 is offline   Reply With Quote
Old 7th March 2007, 01:25 AM   (permalink)
Default

Hand wiring is how I made the prototype, wasn't as reliable as a pre etched PCB though.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 7th March 2007, 02:52 AM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
Hand wiring is how I made the prototype, wasn't as reliable as a pre etched PCB though.
Wow.... How big was it? That had to be a terrible knot of wires on the bottom.
Andy1845c is offline   Reply With Quote
Old 7th March 2007, 03:07 AM   (permalink)
Default

Quote:
Originally Posted by Andy1845c
Wow.... How big was it? That had to be a terrible knot of wires on the bottom.
Not too bad actually, only 2 ICs. I use wire-wrap wire but solder it point to point. The USB version looked far worse.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Capacitor Question LiquidOrb24 General Electronics Chat 1 9th January 2007 07:21 PM
Basic Transmission question CamNuge General Electronics Chat 2 8th March 2006 10:08 PM
High speed data logging question cubdh23 Micro Controllers 3 19th August 2004 11:54 AM
Data Logging question with high speed!!!! cubdh23 General Electronics Chat 4 16th August 2004 06:33 PM
PBX question waqar Electronic Projects Design/Ideas/Reviews 0 30th March 2003 06:21 PM



All times are GMT. The time now is 11:39 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.