This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cubloc:connecting_a_backup_battery_to_cb290_cb405:index [2023/04/17 13:26] COMFILE Technology [CUTOUCH] |
cubloc:connecting_a_backup_battery_to_cb290_cb405:index [2023/04/18 11:46] (current) COMFILE Technology |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Connecting a Backup Battery to the CB290 / CB405 / CUTOUCH ====== | + | ====== Backup Battery ====== |
===== CB290 / CB405 ===== | ===== CB290 / CB405 ===== | ||
Line 13: | Line 13: | ||
the case of an emergency. | the case of an emergency. | ||
- | {{ :cubloc:connecting_a_backup_battery_to_cb290_cb405:backupbattery.png?500 }} | + | {{ :cubloc:connecting_a_backup_battery_to_cb290_cb405:backupbattery.png? }} |
- | ===== Power Features ===== | + | ==== Power Features ==== |
* Operating Voltage : 4.5V to 5.5V | * Operating Voltage : 4.5V to 5.5V | ||
* Operating Clock : 18.432MHz | * Operating Clock : 18.432MHz | ||
Line 24: | Line 24: | ||
* Operating Humidity : 5 to 95% RH (Keep the board's surface dry when in use) | * Operating Humidity : 5 to 95% RH (Keep the board's surface dry when in use) | ||
- | ===== Additional Information ===== | + | ==== Additional Information ==== |
- | If a Cubloc module is supplied with power above the recommended voltage, | + | If a CUBLOC module is supplied with power above the recommended voltage, |
the device can be destroyed. Also please be careful to avoid electrostatic | the device can be destroyed. Also please be careful to avoid electrostatic | ||
discharge, as it too can destroy the device. Please be aware that P1 is an | discharge, as it too can destroy the device. Please be aware that P1 is an | ||
Line 32: | Line 32: | ||
SIN, SOUT, and ATN, please do not connect them to anything. | SIN, SOUT, and ATN, please do not connect them to anything. | ||
- | ===== CUTOUCH ===== | + | ===== CT1721C ===== |
+ | The CT1721C will maintain data in its volatile memory when powered off by using a backup battery. If backup is not needed, the program should clear the memory at the beginning of the program. | ||
+ | |||
+ | <code xbasic> | ||
+ | Const Device = CT1720 | ||
+ | Dim TX1 As Integer, TY1 As Integer | ||
+ | TY1 = 0 ' Clear only TY1 | ||
+ | </code> | ||
+ | |||
+ | Use [[cubloc:ramclear:index|RamClear]] to clear all data memory at the start of your program. | ||
+ | |||
+ | <code xbasic> | ||
+ | Const Device = CT1720 | ||
+ | Dim TX1 As Integer, TY1 As Integer | ||
+ | RamClear ' Clear all RAM, both TX1 and TY2 | ||
+ | </code> | ||
+ | |||
+ | To add a backup battery to the CT1721C, connect a 3V battery to the "Batt. Backup" terminal on the back, bottom right side of the CT1721C and leave the "JUMPER_SUPERCAP" open. To use a super capacitor instead of battery, connect the super capacitor to "Batt. Backup" and short the "JUMPER_SUPERCAP" terminal to enable charging while the power is on. | ||
+ | |||
+ | {{ :cubloc:connecting_a_backup_battery_to_cb290_cb405:cutouch_battery.png }} | ||
+ | |||
+ | In Ladder Logic, all registers S, M, C, T, and D are retained by the backup battery. Register P is cleared by default when the device is powered on. If you only want to clear parts of a register, rather than all registers, use the following method: | ||
+ | |||
+ | <code xbasic> | ||
+ | Const Device = CT1720 | ||
+ | Dim i As Integer | ||
+ | For i=0 to 32 ' Clear only M0 to M32 | ||
+ | _M(i) = 0 | ||
+ | Next | ||
+ | Set Ladder On | ||
+ | </code> | ||
+ | |||
+ | [[cubloc:index|CUBLOC - Embedded Controller]] |