You are on page 1of 16

CPE 185 Study Midterm

Table of Contents:

In Class Review Notes ………………2

Important Documents/pages …..3

Quiz Summary …………………………4

TTL VS CMOS ……………….5

General……………………………………6,7
Analog Discovery ……………………9

Past Tests ……………………………….10

Lecture Notes Summary………….13


In Class Review Notes:

Analog discovery

HEX vs Decimal vs Binary

Microchip, raspberry PI processor arm:

SPI r2 c

Tris= set outputs mask protects outputs from changing

Lat

Port

http://ww1.microchip.com/downloads/en/devicedoc/61120d.pdf

ADC:

1)resolution//sampling rate

2) quanitization//how big steps between 0 to 1 V

0 to 5 2.5/5 = x/4096

TTL vs CMOS

Spin= parallax code

Jump lengh hand assembly

Pop push FIFO

Shift=multiply shl 0F, 1


Documents That will be open:

Ascii Table http://www.asciitable.com/

Binary to hex converter https://www.rapidtables.com/convert/number/binary-to-


decimal.html?x=1101.01

Analog to Digital Converter max/ min https://www.eetimes.com/document.asp?doc_id=1276974#

Old Detailed Test (mostly midterm 1) https://www.studocu.com/en-us/document/california-state-


university-sacramento/computer-interfacing/past-exams/compilation-of-exams/1867981/view

Old test (mostly midterm 2) https://www.studocu.com/en-us/document/california-state-university-


sacramento/computer-interfacing/past-exams/midterm-two-cpe-185/1867939/view

Packed 32 hex (hw 9) https://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html

Word document study sheet

Word document test prep

In X86lab download folder

Jumpcontable

Irvineapp

Hand assembely instruction

Debug flags

Intel code table

Links for hardware

http://learn.parallax.com/support/reference/using-propeller-activity-board

http://learn.parallax.com/support/reference/using-propeller-activity-board

https://projects.raspberrypi.org/en/pathways/getting-started-with-raspberry-pi

https://www.microchip.com/mplab/mplab-x-ide
Quiz 0:
Red red red red gold series with orange orange orange gold = 35.2kohms

3R3 = 3.3 5k6= 5.6 k


LED current 3-35mA, Light Emitting Diode
Quiz 1:
BCD 0001 0000= 10
1G memory in windows systems area
Memory above the first 1m = protected, extended memory
DOS=early operating system and disk operating system
Quiz 2:
Enter = 0D
Unicode = 16 bit code with windows
Quiz 3:
ADD 8CH, 7EH carry flag is set answer 0AH
OPCODE = command , cmp , add…
OPERAND = registers/ memory locations
CmP BL, AL
JA … //if BL>AL
Quiz 4:
E2 ROR 5 = 17
1110 0010 -- 0001 0111
ASCII 128 different symbols
BIOS 0AH = service number
Quiz 5:
Errorlevel 3 goto …/ >=3
Input byte = i15
Quiz 6:
MOV AL, [SI] MOVD EAX [SI]
INC SI INC SI
_____
LODSB LODSD
Midterm 1:

Reference Table TTL LOW TTL HIGH CMOS LOW CMOS HIGH
Input 0-0.8 2-5 0-1.5 3.5-5
Output 0-0.5 2.7-5 Essentially 0 Essentially 5
General:
How many bits' address is required for a computer with n bytes of memory?

you need log2(n) bits to address n bytes. For example, you can store 256 different values in
an 8 bit number, so 8 bits can address 256 bytes. 210 = 1024, so you need 10 bits to
address every byte in a kilobyte. Likewise, you need 20 bits to address every byte in a
megabyte, and 30 bits to address every byte in a gigabyte. 232 = 4294967296, which is the
number of bytes in 4 gigabytes, so you need a 32 bit address for 4 GB of memory.

https://en.wikipedia.org/wiki/Binary-coded_decimal
BCD
Example Hand Assembely
Strings Attached Program:
Page 58, 80
Title strings_attached

cseg segment 'code'


assume cs:cseg, ds:cseg, es:cseg, ss:cseg

org 100h
start: mov ah,0
int 16h
mov cx,ax
and cx, 000fh
mov ah, 0eh
int 10h
cld
mov ax, 0e0dh
int 10h
mov ax, 0e0ah
int 10h
mov si, offset shopa
mov di, offset shopb
repz cmpsb
jz good
mov dx, offset notso
jmp putout

good: mov dx, offset fine


putout: mov ah,09
int 21h
mov ah, 4ch
int 21h

org 200h

shopa db "SHOPPER", 20h, 0dh

shopb db "SHOPPING",0dh

fine db "EQUAL",0dh, 0ah, "$"

notso db "NOT EQUAL", 0dh, 0ah, "$"

cseg ends
end start
Subroutines demo
.286
cseg segment 'code'
assume cs:cseg, ds:cseg, ss:cseg, es:cseg
org 100h

start: push sp
call subr1
mov ah, 4ch
int 21h

subr1: push sp
call subr2
ret

subr2: push sp
pusha
pop dx
popa
ret

cseg ends
end start
Analog Discovery Functions:
https://analogdiscovery.com/?utm_source=google_search&utm_medium=ppc&utm_campaign=AD2_pr
o_oscilloscope_customers&utm_content=interest_2&gclid=Cj0KCQjw19DlBRCSARIsAOnfRei8WRgYW7b
X1KGoLnFeJiCkT_Q5KeV36TefkxLiFNaByAYJ2tVan20aAsXEEALw_wcB

Oscilliscope – displays voltages signals as function of time


Waveform Generator – Generates waves has triggering sources
Power supplies – supply voltage
Voltmeter – Measure voltage
Data logger – records data over time or in relation to location
Logic analayzer – captrures and displays multiple signals froma adagial system or circuit
Pattern generator - generate a user define pattern of digital logic high/low signals or pulses
Static I/O – static input/output pins are used for either sensing or generating change of state instances
Spectrum Analyzer – pinpoints both internal and external trouble spots to help fine tune your device for
more efficient performance
Network Analyzer – you get a better idea of how your circuit responds to various types of inputs
Impedance Analyzer – provides information about the load under test from the impedance admittance
inductance capacitance phase and quality factor
Protocal Analyzer – find out which compomnent isn’t working
Script Editor –
Past Tests:

https://www.studocu.com/en-us/document/california-state-university-sacramento/computer-
interfacing/past-exams/compilation-of-exams/1867981/view
Lecture Notes:
Week 2:
Little Endian : LSB to MSB
Big Endian : MSB to LSB
AX, Accumulator BX, Base
CX, Count DX, Data
Week 5:
BIOS built in operating system
00 video mode
02 cursor position
0E writes character in TTY mode
Week 7:
20bit Physical memory address (external to processor)
and is the addition of the Offset and segment base address.
The Logical address is described by the segment address and Offset, ( like CS: IP )
To find Physical address, shift left segment base by 4 bits and add to offset (see above). Triebel page 38
Week 9:
Load string Word, LODSW , page 192 of text.
Use:
LODSW
moves the word pointed to by register SI to register AX. SI is then incremented (when the direction flag
is reset) otherwise decrement by 2 to point at the next word in the string.
LODSW saves instructions like
Mov AX, [SI]
Add SI, 2

Loop instructions
POP, PUSH
Parallel / serial IO
RS232

https://en.wikipedia.org/wiki/RS-232

Connection between DTE (data terminal equipment) and DCE (data circuit-terminating equipment or
data communication equipment)

Lower transmission speed short max cable length large voltage sing large standard connectors no
multipoint capability and limited multidrop capability. USB has displaced RS232

0= +3 to +15 V 1 = -15 to -3 V

RS422
https://en.wikipedia.org/wiki/RS-422

Differential signaling 10 Mbit/s can sent through long cables

RS423

https://en.wikipedia.org/wiki/RS-423

interchange of serial binary signals between DTE and DCE


PPE board Parallel interfacing, row column scan
MASM ,
Propeller Lab
MicroChip Lab
Floating Point numbers
Parallel and Serial Ports
Midterm 1 Study:
https://www.allaboutcircuits.com/textbook/digital/chpt-3/logic-signal-voltage-levels/

TTL gates and CMOS gates input/output low/high voltages

https://www.eetimes.com/document.asp?doc_id=1276974

Analog to digital converter min/max value

https://softwareengineering.stackexchange.com/questions/178921/how-many-bits-address-is-required-
for-a-computer-with-n-bytes-of-memory

how many lines of addressing do you need for x bytes

parallax propeller=8 processors, spin/c code

5+5 , 3+3= OF? CF?

Analog discovery functions

If you wanted to examine the data from a 12C bus what tool would you use on analog discovery
functions

Polling

1D72:010F 7D18 JGE 0128 How many bytes in decimal will the processor jump if the conditions for a
jump are met?

Addressing modes

Precompiler statemetns

Debug to execute interrupts without stepping through the interrupt

10 bit resolution ADC what max value will be returned from ADC
wfhat is the advantage of C Language over Assembly Language?

C is transportable to other microprocessor architectures

The instruction MOV CX, DADD is what addressing mode ➔ Immediate

The instruction MOV CX, [DADD] is what addressing mode ➔ Direct

You might also like