Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
learn:courses:microprocessor-io-unit-1:start [2021/10/07 20:45] Arthur Brownlearn:courses:microprocessor-io-unit-1:start [2021/10/13 22:24] (current) Arthur Brown
Line 36: Line 36:
 ==== 4.1. Hardware ==== ==== 4.1. Hardware ====
   - [[microprocessor/basys-mx3/start|Basys MX3 trainer board]]   - [[microprocessor/basys-mx3/start|Basys MX3 trainer board]]
-  - [[http://store.digilentinc.com/usb-a-to-micro-b-cable/|Micro USB cable]]+  - [[https://digilent.com/shop/usb-a-to-micro-b-cable/|Micro USB cable]]
   - Workstation computer running Windows 10 or higher, MAC OS, or Linux   - Workstation computer running Windows 10 or higher, MAC OS, or Linux
  
Line 643: Line 643:
 If the bit in the TRIS register is set low to make the I/O pin to function as an output, the voltage pin can be set high by writing a 1 to the appropriate bit in the LAT register. Setting the LAT register bit to a zero sets the output pin low (0V). The actual voltage at the output pin depends on the setting in the ODC register. The default configuration has all bits in the ODC register set to zero, which means the output can both source (supply output current) and sink (pull outputs low) current. If the bit in the ODC register is set high, then the output pin functions as open drain, which can sink current but not source current.  If the bit in the TRIS register is set low to make the I/O pin to function as an output, the voltage pin can be set high by writing a 1 to the appropriate bit in the LAT register. Setting the LAT register bit to a zero sets the output pin low (0V). The actual voltage at the output pin depends on the setting in the ODC register. The default configuration has all bits in the ODC register set to zero, which means the output can both source (supply output current) and sink (pull outputs low) current. If the bit in the ODC register is set high, then the output pin functions as open drain, which can sink current but not source current. 
  
-The maximum current capability of each conventional I/O pin is 15mA (sink or source), while the combined current of all I/O pins is 200mA subject to total power constraints. I/O pins have both open drain and active source output capability. The open drain capability provided by the ODC register is useful when interfacing with switch array keypads (see [[http://store.digilentinc.com/pmodkypd-16-button-keypad/|Pmod KYPD]] for an example keypad device). The outputs that drive the four LEDs on the Basys MX3 board are limited to approximately 5mA. +The maximum current capability of each conventional I/O pin is 15mA (sink or source), while the combined current of all I/O pins is 200mA subject to total power constraints. I/O pins have both open drain and active source output capability. The open drain capability provided by the ODC register is useful when interfacing with switch array keypads (see [[https://digilent.com/shop/pmod-kypd-16-button-keypad/|Pmod KYPD]] for an example keypad device). The outputs that drive the four LEDs on the Basys MX3 board are limited to approximately 5mA. 
  
 The PORT register allows the state of pin to be read regardless if the pin is configured in the TRIS register to be an input or an output. If the voltage on the pin is above the high input threshold, the PORT bit is read as a logic one. Various processor pins have different thresholds.  The PORT register allows the state of pin to be read regardless if the pin is configured in the TRIS register to be an input or an output. If the voltage on the pin is above the high input threshold, the PORT bit is read as a logic one. Various processor pins have different thresholds.