UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

L9.1

Lecture 2

L9.2: Basic I/O. Planning projects: general organisation of hardware and software.

 [P9]  Hardware circuit, init_system()

L9.3

[16/5]

3.4.2. Planning

3.4.2.1. Hardware schematic

3.4.2.1.1. Connecting switches and buttons

3.4.2.1.2. Oscillator (OSC) and reset (MCLR_L) circuits

Crystal CLK

Fig. 1. Example of typical external quartz crystal Oscillator.

MCLR_L

Fig. 2. Example of typical external MCLR_L circuit (CD_L): Power-ON reset (RC) network and active-low push-button for initialising the microcontroller.

 

3.4.2.1.3. Interfacing LED

3.4.2.1.4. Tri-state logic gates and wire bi-directionality. Bus concept.

The idea of tri-state gates and bidirectional wires and buses.

3.4.2.2. Software program

 

software
Fig. 3.  Software organisation flowchart. 

3.4.2.2.1. RAM variables

3.4.2.2.2. init_system(): I/O port pin configuration register (TRIS).

Our goal: How to configure a port pin as input or as output. TRIS data direction register. 

Pin direction configuration

Fig. 4.  Example of pin direction configuration.

 


Let discuss all there ideas designing an example circuit. 

3.4.4.2. Adder_BCD_1digit