Update readme

Missing description
parent 7a03e041
......@@ -20,6 +20,88 @@
### Firmware implementation
`JTAGPort::begin()`:
* Setup TMS, TCK, TDO and TDI pins
* Reset JTAG state machine
* Doesn't return.
`void JTAGPort::reset()`:
* set TMS pin to HIGH.
* Do 5 clock Cycles to reach reset state on Jtag state machine.
* Doesn't return.
`void JTAGPort::clockPulse()`:
* Set TCK pin to HIGH.
* Wait 3 microseconds.
* Set TCK pin to LOW.
* Wait 3 microseconds.
* Doesn't return.
`void JTAGPort::sendBits(uint8_t tms, uint8_t tdo)`:
* Set TMS pin to tms.
* Set TDO pin to tdo.
* Do a clock cycle.
* Doesn't return;
`void JTAGPort::sendBits(uint8_t tms, uint8_t tdo, uint8_t size)`:
* Sends tms and tdo bytes up to position size.
`void JTAGPort::setDR()`:
* Set JTAG state machine to DATA SHIFT state.
`void JTAGPort::setIR()`:
* Reset JATG state machine.
* Set JTAG state machine to INTRUCTION SHIFT.
`void JTAGPort::sendInst(uint8_t instruction)`:
* Set JTAG state machine to INSTRUCTION SHIFT.
* Write chosen instruction.
* Exit into JTAG state machine ready state.
`void JTAGPort::sendData(uint8_t tdo_pos, uint8_t value)`:
* Set JTAG state machine to DATA SHIFT state.
* Bit shift 0 into chosen pin Input register.
* Bit shift value into chosen pin Output register.
* Bit shift 1 into chosen pin Control register.
* Bit shift 1 into Reset.
* Exit into JTAG state machine ready state.
`uint8_t JTAGPort::readData()`:
* Read from TDI pin.
* Shift data bit.
* return 1 if TDI pin is HIGH or 0 if LOW.
`uint8_t JTAGPort::readData(uint8_t tdo_pos)`:
* Set JTAG state machine to DATA SHIFT state.
* Send bits until reaching tdo_pos.
* Read TDI pin.
* Exit into JTAG state machine ready state.
* return 1 if TDI pin is HIGH or 0 if LOW.
`uint32_t JTAGPort::getID()`:
* Set intruction to IDCODE.
* Set JTAG state machine to DATA SHIFT state.
* Read TDI and bitshift readings into value.
* Exit into JTAG state machine ready state.
* return value.
`void JTAGPort::setLED(uint8_t value)`:
* Set Intruction to EXTERNAL TEST.
* Write 1 to LED pin register.
`uint8_t JTAGPort::checkButton()`:
* Set Instruction to SAMPLE AND PRELOAD.
* Read button pin register.
* return value read.
###### lixo
`void asynch9_init()`:
* Setup the baud rate;
* Set master as transmiter and slave as receiver;
......@@ -70,12 +152,4 @@
* Clone this repository with `git clone https://git.fe.up.pt/up201808899/asynch9_a2_b01.git`;
* Compile the *main.cpp* file with PlatformIO to get *.hex* file;
* Flash the *.hex* file to the master and slaves.
### Schematic
![Schematic](https://image.easyeda.com/histories/f59e69290e9a444aad2a27f319af673b.png)
### PCB layout
![Pcb](https://image.easyeda.com/histories/460c1efc10da4049b38d38f9de71851e.png)
\ No newline at end of file
* Flash the *.hex* file to the master and slaves.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment