upc eetac_1

Week 8

Week 9: Generation of CLK signals from external (quartz crystal oscillators) and dedicated processors (datapath & control unit)

Week 10



[21/11]

Guided activities #9

[P8] Dedicated processors (datapath + control unit + CLK generators)

CLK generator design. Frequency dividers.

 

 

Discussion of an advanced project: Designing the digital timer proposed in P8. The general idea is a dedicated processor:

- Datapath (registers and aritmetic and logic circuits)

- Control unit (FSM)

 

-  Oscillators. RC, quartz crystal, 555 chip, etc.  This is an old unit on CLK circuits based on gates or specific integrated circuits.

- The CLK_Generator:  frequency dividers and the T_FF as a circuit to square pulsed signals.

 

 


Week 8

Week 9: Chapter III: Introduction to microcontrollers

Week 10




[25/11]

Laboratory #9

[P9] Microcontrollers

Theory

Example on digital I/O.

 

Chapter III. This course we'll use the 8-bit microcontroller chip PIC18F4520 from Microchip, MPLAB X integrated development environment (IDE) and Proteus VSM as the simulation tool.

The architecture of the PIC18F family (or another micrcontroller like the PIC16F877A or the ATmega8535).

Please, read basic theory on microcontrollers in the many books available in the library. Harvard versus Von Neumann architectures, 8-bit, 16-bit, etc. families, assembler instructions, RAM memory, EPROM Flash) program memory, I/O ports, etc.

 


Your first tutorial using microcontrollers: the Dual_MUX4. Specifications, plan organising the C code in our CSD style, develop & test step by step:

- Hardware (microcontroller, oscillator, reset and I/O pins)

- I/O port. Hardware and configuration register. How to configure a port pin as input or as output. 

- Read inputs.

- Write outputs.

- Translate the truth table to C.

Tutorial on the integrated development environment (IDE) MPLAB-X + XC8

Let's examine the planning and the source code proposed for the Dual_MUX4: pins-variables, reading inputs, writing outputs, bitwise logic operations (AND, NOT, OR, shift left or right, etc.)

 

This is the due date for the PLA#2_2.

 


[26/11]

Lecture #9

[P9] Another example: designing a 1-digit BCD adder

Debugging tools: break points, step by step mode, watch windows, etc.

 

The idea is to implement a 1-digit BCD adder, just another combination circuit like in P3, but this time using a μC and a program written in C language and compiled, instead of logic gates.

- Hardware: μC , oscillator, reset and I/O pins. Adapt the Dual_MUX4 hardware to be the 1-digit BCD adder.

- Configure pins as inputs or outputs

- Read inputs

- Write outputs

- Translate the truth table to C. Which is the algorithm to add numbers in BCD?

 


Basics ideas on programming and debugging. C  source file, target chip, integrated development environment (IDE), compilation, output files ELF or COF and HEX, simulation in Proteus, step by step debugging, breakpoints, watch variables, etc.

- Measurements: loop time, interrupt time, etc. How does it take to eecute an instruction in C or in assembly ?

 

It is time for printing and reading the preparatory laboratory assignment PLA#3.1 (individual) for the next LAB#11.