User Tools

Site Tools


en-us_commands:reference:irtc32khz

Differences

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

Link to this comparison view

Next revision
Previous revision
en-us_commands:reference:irtc32khz [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:reference:irtc32khz [2026/09/14 20:30] (current) – external edit 127.0.0.1
Line 14: Line 14:
  
 ===== Example ===== ===== Example =====
 +
 +This example connects a DS3231 RTC module to the MPINO-16A8R8T I²C port. The RTC's 32 kHz and square-wave outputs use different pins.
  
 <code cpp> <code cpp>
-bool IrtcSquareWave(bool enable, uint8_t frequency = IRTC_SQUARE_WAVE_1HZ, +void setup() { 
-                    bool batteryPowered = false); +  Serial.begin(115200); 
-bool Irtc32kHz(bool enable = true);+  if (!IrtcBegin()) {  // Check the DS3231 connection and start the RTC. 
 +    Serial.println(F("DS3231 not found")); 
 +    return; 
 +  } 
 +  const bool configured Irtc32kHz(true);  // Enable the RTC's 32 kHz output pin. 
 +  Serial.println(configured ? F("Output enabled") : F("RTC setup failed")); 
 +
 + 
 +void loop() {}
 </code> </code>
  
Line 24: Line 34:
  
 Run each device's corresponding ''Begin'' command first. Check I²C addresses and pin sharing; if the ''bool'' return value is ''false'', inspect wiring and power. Run each device's corresponding ''Begin'' command first. Check I²C addresses and pin sharing; if the ''bool'' return value is ''false'', inspect wiring and power.
 +
 +===== Built-in Commands in the Same Category =====
 +
 +  * [[:en-us_commands:reference:irtcbegin|IrtcBegin() View detailed description]]
 +  * [[:en-us_commands:reference:irtcread|IrtcRead() View detailed description]]
 +  * [[:en-us_commands:reference:irtcset|IrtcSet() View detailed description]]
 +  * [[:en-us_commands:reference:irtcunixtime|IrtcUnixTime() View detailed description]]
 +  * [[:en-us_commands:reference:irtcgettemperature|IrtcGetTemperature() View detailed description]]
 +  * [[:en-us_commands:reference:irtctimevalid|IrtcTimeValid() View detailed description]]
 +  * [[:en-us_commands:reference:irtcclearoscillatorstopflag|IrtcClearOscillatorStopFlag() View detailed description]]
 +  * [[:en-us_commands:reference:irtcsetalarm1|IrtcSetAlarm1() View detailed description]]
 +  * [[:en-us_commands:reference:irtcsetalarm2|IrtcSetAlarm2() View detailed description]]
 +  * [[:en-us_commands:reference:irtcalarmenable|IrtcAlarmEnable() View detailed description]]
 +  * [[:en-us_commands:reference:irtcalarmenabled|IrtcAlarmEnabled() View detailed description]]
 +  * [[:en-us_commands:reference:irtcalarmtriggered|IrtcAlarmTriggered() View detailed description]]
 +  * [[:en-us_commands:reference:irtcsquarewave|IrtcSquareWave() View detailed description]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/irtc32khz.1788785567.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki