程序代写代做代考 chain assembly 18/09/2014

18/09/2014
Embedded Systems Design ELEN90066
Lecture 15 Assembly, Testing, JTAG David Jahshan
1

18/09/2014
Orientation of the LED On Top
On Bottom
JTAG
• Joint Test Action Group
• Used for debugging embedded systems
• It was originally designed to test between chips
• Used for accessing on chip debugging information (registers, RAM, program counter)
• Also used for programming FLASH
JTAG architecture
• Has 4 pins TDI, TDO, TMS, TCK
• TDI is test data in
• TDO is test data out
• TMS is test mode select
• TCK is test clock
• Optionally TRST test reset
• You can have many IC’s in a chain
• When in a chain the output of TDI is connected to TDO input on the next chip
JTAG multiple devices
Wikimedia Creative Commons
2

18/09/2014
JTAG interfacing
• Could theoretically be done directly from a PC through the parallel port
• Often done through a separate microcontroller connected to the PC via a serial port (or USB emulation of serial port)
• We will be constructing a USB JTAG interface board as a practice soldering exercise
• Also powered by an ATMEGA16
Building your JTAG interface
• We will cover soldering on Monday
• Pick up your kits next week
• One kit per person + 1 JTAG programmer
• Not everyone will get their JTAG working
• As long as you have access to one it is ok focus on your board, more important
Incremental Assembly
􏹧 Don’t construct your entire projects in one hit!
􏹧 Build the power supply first (regulator + Caps)
􏹧 Add temporary leads to attach to bench
power supply
􏹧 Current Limit your power supply. For initial testing 100mA is plenty.
􏹧 Test power supply circuitry (3.3v output)
Incremental Assembly
􏹧 Attach the Microcontroller
􏹧 Check Voltage and current (less than 30mA)
􏹧 Add clock circuit and JTAG header
􏹧 Test JTAG connection. Test interface to JTAG
􏹧 Program Fuses to use external crystal (be very careful, never turn off the JTAG and ISP programming modes and don’t set security bits.) Use oscilloscope to test crystal’s oscillation.
Incremental Assembly
􏹧 Add LEDs and write test code to turn on LEDs
􏹧 Add LCD and test backlight
􏹧 Add RAM and test RAM
􏹧 Order might change if there are clearance issues.
Lab Power supplies
• Have two modes, Voltage control and Current control.
• In Voltage mode the voltage is held constant
• In current mode the current is held constant
• When you turn on the supply you set the maximum voltage and the maximum current limit
• The power supply decides which mode it will operate in.
• If you are trying to draw more current than the max limit, the voltage drops.
3

18/09/2014
CURRENT LIMIT YOUR POWER SUPPLY!!!
• Test your PCB the lab supplies!
• You will blow up your PCB if you do not current
limit it
• You will need less than 250mA so before you turn on the output of your PCB limit the power supply to 250mA
• Make sure you set the appropriate voltage input. 3.3v if driving the circuit directly. 1.5v if you are driving it through the boost regulator
• If your voltage drops and the current is at 250mA then the power supply is current limited
Fault Finding Basic Faults
􏹧 If a device does not work
1. Make sure there is power to all the correct pins
2. If there is no power, check power into regulator
3. If there is power to regulator check continuity to each
pin from regulator
4. If there is power to the device, check continuity from
inputs.
5. If there is continuity from inputs, check voltages on
inputs are correct. If not, then other device providing
input is a problem, repeat 1 to 4 on that device.
6. If there is no continuity reheat solder joints.
Intermittent Faults
􏹧 Dry solder joints may short when you measure them. (Putting pressure on the pin)
􏹧 Not enough decoupling capacitors, device rests at certain events.
􏹧 Voltage regulator drops out when powering up high current device.
􏹧 Oscilloscope probe adds capacitance and resistance to sensitive analog.
Oscilloscope Probes
􏹧 Using a couple of wires from oscilloscope is not very accurate
􏹧 Theyhavehighlinecapacitance
− Square wave can become a sine wave
􏹧 They have large loops to pick up external noise
􏹧 They add a 1MOhm resistor and 13pF capacitor +
parasitic line capacitance in parallel to the signal you are measuring.
􏹧 Oscilloscope probes are specially designed to minimise these effects.
Oscilloscope probes
􏹧 10xprobeincreasestheresistanceseenbythedeviceto 10MOhms.
􏹧 A9MOhmresistorisaddedinseriestocreateavoltage divider. (Hence 10 x signal = true value)
􏹧 Acapacitorisaddedinseriestodivideby10ACsignals. Cancels RC, provides a flat response.
Oscilloscope Probe
􏹧 Intermittent problems can go away due to the added load/capacitance of the probe lead. Think carefully before you add a lead.
􏹧 Large loops on your oscilloscope can pick up background noise.
􏹧 In very high speed applications add special connectors to connect GND and signal with minimal loop.
􏹧 Auto set button can set gain very high and you might be picking up just background noise. (50Hz)
4

18/09/2014
Remanufacturing your PCB
• I recommend iteadstudio
• http://imall.iteadstudio.com/open-pcb/pcb- prototyping/im120418002.html
• $22 USD plus shipping to remanufacture your PCB (only accepts PayPal).
– 1.6mm board thickness – Surface finish HASL
– E-Test yes
Gerber Files
• You must create a Gerber files
• File -> Fabrication Outputs -> Gerber Files • General-> Units-> Inches Format->2:5
• Layers
• Plot: GTO, GTS, GTL, GBL, GBS, GBO
• Mechanical layers to add to all plots Mechancial 1
• File -> Fabrication Output -> NC Drill Files
– Units-> Inches Format->2:5
– .txt files
• Zip the .gto .gts .gtl .gbl .gbs .gbo .txt files and send to manufacturer
Next Lecture • C programming
5