We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
...
Several of Digilent’s other Pmods use I2C, include these resistors, and also include connectors to plug additional Pmods into the same I2C bus. If this RTCC Pmod is used in conjunction with one those Pmods, the user can automatically take advantage of the pull-up resistors already included on those boards and no further action is needed.
Port Descriptions
Table 3 1 describes the RTCC Pmod Controller’s ports.
Table 31. Port Descriptions
Port | Width | Mode | Data Type | Interface | Description |
---|---|---|---|---|---|
clk | 1 | In | standard logic | user logic | System clock |
reset_n | 1 | In | standard logic | user logic | Asynchronous active low reset |
scl | 1 | inout | standard logic | RTCC Pmod | Serial clock of I2C bus |
sda | 1 | inout | standard logic | RTCC Pmod | Serial data of I2C bus |
i2c_ack_err | 1 | out | standard logic | user logic | I2C communication error flag: '0' = no communication error, '1' = the RTCC Pmod did not properly acknowledge a transaction |
set_clk_ena | 1 | In | standard logic | user logic | Set clock enable; toggling this bit to '1' for a system clock cycle latches in the input clock settings and initiates a transaction with the RTCC to set the time and date, and to start the RTCC onboard oscillator to begin timekeeping |
set_seconds | 7 | In | standard logic vector | user logic | Seconds input clock setting; 2 digits in BCD format (00 to 59) |
set_minutes | 7 | In | standard logic vector | user logic | Minutes input clock setting; 2 digits in BCD format (00 to 59) |
set_hours | 5 | In | standard logic vector | user logic | Hours input clock setting; 2 digits in BCD format (00 to 12) |
set_am_pm | 1 | In | standard logic | user logic | AM/PM input clock setting; AM = '0', PM = '1' |
set_weekday | 3 | In | standard logic vector | user logic | Weekday input clock setting; 1 digit in BCD format (1 to 7) |
set_day | 6 | In | standard logic vector | user logic | Day of month input clock setting; 2 digits in BCD format (01 to 31) |
set_month | 5 | In | standard logic vector | user logic | Month input clock setting; 2 digits in BCD format (00 to 12) |
set_year | 8 | In | standard logic vector | user logic | Year input clock setting; 2 digits in BCD format (00 to 99) |
set_leapyear | 1 | In | standard logic | user logic | Set leapyear ('1') or not a leapyear ('0') |
seconds | 7 | out | standard logic vector | user logic | Seconds clock output; 2 digits in BCD format (00 to 59) |
minutes | 7 | out | standard logic vector | user logic | Minutes clock output; 2 digits in BCD format (00 to 59) |
hours | 5 | out | standard logic vector | user logic | Hours clock output; 2 digits in BCD format (00 to 12) |
am_pm | 1 | out | standard logic | user logic | AM/PM clock output; AM = '0', PM = '1' |
weekday | 3 | out | standard logic vector | user logic | Weekday clock output; 1 digit in BCD format (1 to 7) |
day | 6 | out | standard logic vector | user logic | Day of month clock output; 2 digits in BCD format (01 to 31) |
month | 5 | out | standard logic vector | user logic | Month clock output; 2 digits in BCD format (00 to 12) |
year | 8 | out | standard logic vector | user logic | Year clock output; 2 digits in BCD format (00 to 99) |
Connections
This Pmod has an 8-pin connector. Table 2 provides the pinout for this connector. The RTCC Pmod Controller’s ports need to be assigned to the FPGA pins that are routed to this connector as listed. The two rows of the J1 connector are tied together on the Pmod board, so only one side needs to be connected to the FPGA.
Table 2. RTCC Pmod Pinout and Connections to RTCC Pmod Controller
Pmod Connector | Pmod Pin Number | RTCC Pmod Port | RTCC Pmod Controller Port |
---|---|---|---|
J1 | 1 & 5 | Serial Clock (SCL) | scl |
J1 | 2 & 6 | Serial Data (SDA) | sda |
J1 | 3 & 7 | GND | - |
J1 | 4 & 8 | VCC | - |
Reset
The reset_n input port must have a logic high for the RTCC Pmod Controller component to operate. A low logic level on this port asynchronously resets the component. During reset, the component aborts the current transaction with the Pmod and clears all of the time and date clock outputs, i.e., seconds, minutes, hours, am_pm, weekday, day, month, and year. It also clears the i2c_ack_err output. It does not reset the RTCC itself, so the RTCC will continue tracking the time and date from its last setting. Once released from reset, the RTCC Pmod Controller restarts its operation. It resumes collecting time and date data from the RTCC and outputting the result.
...