chapter one transparency - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

chapter one transparency

Description:

is assigned using 74F138 3-to-8 decoder. Address signals A12 and A11 are tied to CS1 and CS0 and ... Address of Tx Data Register $9801 (1001 1000 0000 0001) ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 10
Provided by: gatew315
Category:

less

Transcript and Presenter's Notes

Title: chapter one transparency


1
More on Interfacing MC6850 and PPI 8255
2
Interfacing ACIA to the 68HC11 - the 68HC11
should be configured to operate in expanded
mode - an example of circuit connection is shown
in Figure 9.17. - address space should be
assigned to the ACIA 8000- 9FFF (1000 0000 0000
0000 - 1001 1111 1111 1111) is assigned using
74F138 3-to-8 decoder Address signals A12 and
A11 are tied to CS1 and CS0 and thereby reducing
the allocated address space to 9800-9FFF (1001
1000 0000 0000 - 1001 1111 1111 1111).
Reg Sel R/W Register (A0/O0) 1
0 Tx Data Register 1 1
Rx Data Register 0 0 Control
Register 0 1 Status Register
Address of Tx Data Register 9801 (1001 1000 0000
0001) Address of Rx Data Register 9801 (1001
1000 0000 0001) Address of Control Register 9800
(1001 1000 0000 0000) Address of Status
Register 9800 (1001 1000 0000 0000)
3
(No Transcript)
4
Programming 6850 ACIA in C - Sample programs It
is required to program the ACIA in Fig. 9.17 in
loop back mode with the format 8 bit word, even
parity, 1 stop bit a clock rate 16 times the
data rate of the transmitted and received data
interrupts disabled, RTS low. / Define UART or
ACIA ports. / define ACIA_status (unsigned
char ) (0x9800) define ACIA_ctrl (unsigned
char ) (0x9800) define ACIA_data (unsigned
char ) (0x9801) / Define words for control
registers. / define control 0x19 / 00011001
/ / prototyping / void config_ACIA(void) void
send _data(unsigned char data) unsigned char
receive_data(void)
5
/ Configure ACIA with parameters 8 bit word,
even parity, 1 stop bit a clock rate 16 times
the data rate of the transmitted and received
data, interrupts disabled, RTS low / void
config_ACIA(void) / send control word
/ / 8 bit word, even parity, 1 stop bit a
clock rate 16 times the data rate of the
transmitted and received, interrupts disabled,
RTS low use the earlier defined byte, control
as 00011001 for this configuration.
/ ACIA_ctrl control
6
/ A function to transmit a character. / void
char send_ data(unsigned char data) / wait
for transmit data register to be empty
/ while((ACIA_status 0x02) ! 0x02) /
place data into data register. / ACIA_data dat
a / A function to receive a character.
/ unsigned char receive_data(void) / wait
for receive data register to be full.
/ while((ACIA_status 0x01) ! 0x01) /
read data register and return received data.
/ return (ACIA_data)
7
/ A main program to transmit and receive a
character in loop-back mode / void
main() unsigned char data_sent, test /
configure control and command registers.
/ config_ACIA() / Transmit and receive a
character in a continuous loop.
/ while(1) send_ data('A') test receiv
e_data() printf("The received character is
c\n", test) asm("swi")
8
Interfacing PPI 8255 to the 68HC11 - the 68HC11
should be configured to operate in expanded
mode - an example of circuit connection is shown
in the next slide. - address space should be
assigned to the PPI 6000- 7FFF (0110 0000 0000
0000 - 0111 1111 1111 1111) is assigned using
74F138 3-to-8 decoder Signals A1-A0 select the
registers within the PPI as follows
Address of port A 6000 (0110 0000 0000 0000)
Address of port B 6001 (0110 0000 0000
0001) Address of port C 6002 (0110 0000 0000
0010) Address of control Register 6003 (0110
0000 0000 0011)
9
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com