Thaiio.com

Thaiio is the best of PC interfacing Electronic Hardware and Devices resource.

Today , 2007
November 8th, 2007

Cisco CCNA CCNP Certification Exam Troubleshooting Direct Serial Connections

Connecting Cisco routers directly via their Serial interfaces works really well once you get it running - and getting such a connection up and running is easy enough. You can use show controller serial x to find out which endpoint is acting as the DCE, and it’s the DCE that must be configured with the clockrate command.

R3#show controller serial 1

HD unit 1, idb = 0×11B4DC, driver structure at 0×121868

buffer size 1524 HD unit 1, V.35 DCE cable

R3(config)#int serial1

R3(config-if)#ip address 172.12.13.3 255.255.255.0

R3(config-if)#clockrate 56000

R3(config-if)#no shut

Failure to configure the clockrate has some interesting effects regarding the physical and logical state of the interfaces. Let’s remove the clockrate from R3 and see what happens.

R3(config)#int s1

R3(config-if)#no clockrate 56000

R3(config-if)#

18:02:19: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down

The line protocol doesn’t drop immediately, but it does drop. Let’s run show interface serial1 to compare the physical and logical interface states.

R3#show int serial1

Serial1 is up, line protocol is down

Physically, the interface is fine, so the physical interface is up. It’s only the logical part of the interface - the line protocol - that is down. It’s the same situation on R1.

R1#show inter serial1

Serial1 is up, line protocol is down

While a router misconfiguration is the most likely cause of a serial connection issue, that’s not the only reason for clocking issues. Cisco’s website documentation mentions CSU/DSU misconfiguration, out-of-spec cables, bad patch panel connections, and connecting too many cables together as other reasons for clocking problems. Still, the number one reason for clocking problems in my experience is simply forgetting to configure the clockrate command!

Chris Bryant, CCIE #12933, is the owner of The Bryant Advantage, home of free CCNA and CCNP tutorials, The Ultimate CCNA Study Package, and Ultimate CCNP Study Packages.

You can also join his RSS feed and visit his blog, which is updated several times daily with new Cisco certification articles, free tutorials, and daily CCNA / CCNP exam questions! Details are on the website.

For a FREE copy of his latest e-books, “How To Pass The CCNA” and “How To Pass The CCNP”, visit the website and download your free copies. You can also get FREE CCNA and CCNP exam questions every day! And coming in 2007 — Microsoft Vista certification from The Bryant Advantage!

Tags: plc
pac
pc
port
vb
vc
c#
parallel
serial
com
usb

November 8th, 2007

PIC Micro Hardware Programming Methods

There are three ways to program a PIC microcontroller

  1. Using normal programming hardware (high volt programming HVP).
  2. Low volt programming (LVP).
  3. Bootloading.

The first two methods use the programming port of the PIC microcontroller labeled ICSP (In Circuit Serial Programming).

This port is shared between the existing pins of the microcontroller and after programming the pins revert back to normal microcontroller operation.

Note: To make ICSP work correctly you have to consider the effects and requirements of the ICSP programmer e.g. for HVP a high voltage exists at the Vpp pin (your circuit must be able to handle the high voltage - up to 13V). Also the loading for the other signals PGC and PGD must not be too high i.e. don’t put an LED on these pins that uses 20mA - if you did the voltage levels would not be high enough at the inputs to the PIC for programming.

It’s fairly easy to design for ICSP use by using isolation resistors to normal circuitry and choosing not to use heavy loads on these pins.

ICSP provides 6 connections from the pic ICSP programmer to your board as follows :

VPP - (or MCLRn) Programming voltage (usually 13V).
Vcc - Power (usually 5V).
GND Ground (zero volts).
PGD - Data usual port and connection RB7.
PGC - Clock usual port and connection RB6.
PGM - LVP enable usual port and connection RB3/RB4.

PIC Micro: High Volt Programming

To use the first method a hardware interface is needed or ‘PIC programmer’ to interface between the programming software (usually running on the PC) and the PIC chip. This hardware takes its information from the PC via one of three interfaces either:

  • The RS232 COM port
  • The Parallel port
  • The USB port

You choose the interface you want to use and then choose an appropriate PIC programmer. The PC then communicates with the hardware generating the serial (ICSP) signals to translate the PIC hex file into a serial data stream suitable for the target microcontroller.

Note: Almost all PIC microcontrollers use the ICSP interface so once you have a HVP you can program virtually any PIC microcontroller. e.g. you can program 12F675, 16F84, 16F88, 16F877(A), 18F2550, 18F452 etc.

There are several programs for programming PIC micos e.g. ICPROG and many different hardware programmers.

PIC Micro: Low volt programming (LVP)

LVP is exactly the same as HVP except:

  • The Vpp voltage is set to the normal supply voltage.
  • The PGM pin indicates programming mode.

Note: In this mode you can not use the PGM pin for anything else it is dedicated solely to LVP control.

Devices are manufactured with PGM mode enabled and the only way to turn off the PGM mode is to program it using an HVP programmer.

Note: Some PIC microcontrollers can only use the HVP method since for the LVP method you have to sacrifice one pin - PGM - (to tell the PIC Micro either that it is being programmed (high volts e.g. 5V) or that it is not being programmed (0V) ) and some PIC micros only have 8 pins e.g. 12F675. For this chip the PGM pin is not available so HVP is the only way.

The real benefit of using the LVP mode is that you can program several PIC Micros on a board without having to individually program each one - you could daisy chain each extra micro to a master micro which would then program each one in turn - and this is only possible since the Vpp signal is a normal logic level in LVP mode.

PIC Micro: Bootloading

Bootloading uses any available interface to load a program into program memory. It requires a bootstrap program to interpret the interface data and translate it into program memory instructions.

Note: Note only the newer devices that are capable of programming their own memory can use this method.

Typically a serial port is used for bootloading and the PIC micro bootstrap program will wait for a set time after power up listening on the serial port for a reserved word that tells the bootstrap program to start i.e. it listens for sequence of characters that is not normally used on the interface

Once it receives this sequence it enters bootstrap mode where a hex file is transmitted to the microcontroller over the interface. It interprets this and programs the memory of the microcontroller and then starts the program.

There are two issues with this method:

  1. You have to program the bootstrap code using HVP or LVP.
  2. It uses up some of the microcontroller resources.

Once programed it provides a convenient way of using the device as you won’t need programming hardware anymore and one major benefit is that you can re-program a device without undoing the equipment e.g. if you boxed up you project you could still re-program it using the serial port!

You can find more information from the website here and how to build a website like it here.

Copyright © John Main 2006
Free to distribute if the article is kept complete.

http://www.best-microcontroller-projects.com

Tags: plc
pac
pc
port
vb
vc
c#
parallel
serial
com
usb

|
Interior Accessories Shop free xxx cheapest viagra in uk cheap viagra viagra rise levitra alternative levitra vs viagra soft tabs cheapest online cialis 24 hour delivery canadian rx drugs bigtits i made free pornstars drunken asian girls BIGNATURALS big fat booty lessons in blow jobs porn fuck free porn videos free anal old mom video milfs amateur blowjob cheapest online diazepam 24 hour delivery cheap levitra rx pills buy lorazepam cheap cialis buy cheapest generic valium purchase new report female zyban order oxazepam prescription cheapest generic xanax viagra order herbal klipal for woman levitra buy drugs online buy herbal tramadol cialis soft tabs levitra cialis best herbal viagra soft tabs uk cialis buy viagra on line viagra levitra women buy cialis online without prescription natural levitra substitutes cheapest generic viagra cyber pharmacy propecia viagra soft tabs studies women
Close
E-mail It