From be3ce7099325d5c098c9d30e11e1b3600064858c Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann Date: Tue, 29 Sep 2020 22:18:13 +0200 Subject: [PATCH 1/2] added ex 3, 4 and 5, extended readme --- i2c/rtc_dallas_ds3231/README | 43 ++++++++++++++++++++++++++-- i2c/rtc_dallas_ds3231/ds3231_ex3.sr | Bin 0 -> 1110 bytes i2c/rtc_dallas_ds3231/ds3231_ex4.sr | Bin 0 -> 920 bytes i2c/rtc_dallas_ds3231/ds3231_ex5.sr | Bin 0 -> 709 bytes 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 i2c/rtc_dallas_ds3231/ds3231_ex3.sr create mode 100644 i2c/rtc_dallas_ds3231/ds3231_ex4.sr create mode 100644 i2c/rtc_dallas_ds3231/ds3231_ex5.sr diff --git a/i2c/rtc_dallas_ds3231/README b/i2c/rtc_dallas_ds3231/README index 12c783e..beaa4ae 100644 --- a/i2c/rtc_dallas_ds3231/README +++ b/i2c/rtc_dallas_ds3231/README @@ -1,15 +1,16 @@ ------------------------------------------------------------------------------- -Maxim Integrated DS3231 RTC +Maxim Integrated DS3231(M) RTC ------------------------------------------------------------------------------- Details: - - DS3231 datasheet: https://datasheets.maximintegrated.com/en/ds/DS3231.pdf + - DS3231 datasheet: https://datasheets.maximintegrated.com/en/ds/DS3231.pdf + - DS3231M datasheet: https://datasheets.maximintegrated.com/en/ds/DS3231M.pdf Logic analyzer setup -------------------- -The logic analyzer used was Geeetech Mini Board Cypress FX2(LP) eval board +A) The logic analyzer used was Geeetech Mini Board Cypress FX2(LP) eval board with fx2lafw firmware (at 4MHz): Probe DS3231 pin @@ -46,3 +47,39 @@ to 24-hours mode and after Alarm 2 occured: - Write Control/Status register - clear alarm flag - Read date/time - Read temperature (MSB) + + + +B) The logic analyzer used was KeeYees USB Logic Analyzer 24 MHz 8CH +with fx2lafw firmware (at 500kHz): + + Probe DS3231 pin + ------------------------- + 0 SCL + 1 SDA + + +ds3231_ex3.sr +---------------------- + +The file provides writing of time keeping registers to Saturday, 05.09.2020, +17:30:00 h, alarm1 to daily, 06:29:00 h and alarm2 to every Thursday, 09:15 h +Then it reads all registers from 0x00 to 0x12: + +- in one I2C read step +- by sequentially writing the register ID an reading the content +- by sequentially reading the content starting from register 0x0 using auto- + increment + + +ds3231_ex4.sr +---------------------- + +Same as ds3231_ex3.sr, but date / time register in AM/PM mode. + + +ds3231_ex5.sr +---------------------- + +Write same data as in ds3231_ex3.sr, then read 30 registers in one I2Cread +with auto-increment (auto wrap-around after 0x12) diff --git a/i2c/rtc_dallas_ds3231/ds3231_ex3.sr b/i2c/rtc_dallas_ds3231/ds3231_ex3.sr new file mode 100644 index 0000000000000000000000000000000000000000..8b45d36398ec69b0322d77890d17541fe0590f5d GIT binary patch literal 1110 zcmWIWW@h1H0D-blt3cj;SEU$%Y!GG#iKP}5XXfV_1prlvFfcK2fK|DiWPw^!SexWj9lmcCyW zv%-+?-tMoZ_nM6UihcR8obmYXDjDWCkx^488y;Xqb)1=DTg?_G1_lK`1_n-`<8t!T zGm~` z-v57z`7^KUufT4?i6 zZ)W1$6*`Acyf|vNHdRBnTqMi;M~UQ@Z6E&E*|zD0u22c+uiP0-!|M`V{tQa zYizyC);6{d%d=%KC#=(7_$EqQy6C&*$JZ0{T&#a_-(=Lc-k`sF$u5_<^Co0hIaTJb zxYByiO#5Bi;mJqVs=SR2U6d}NezX1Jq+G?h&yP5_xvOe2l)ic| zn|SMEMEC4pfAkoIm2I`NuglIjS(B5hdi{*mvsHYG|2x;2AF|1He4Snv$X4w!U3KBc zPYXNz9~8a&^V~(pQ{6|v(4kYCm8C-{`HkUhj(~5Ar*;X*ms@=kNt+)1ePfpHDx=dO zE}o8phaN26uyLYbNPqGIwbqwA+TLG$_(U_z{9{twg}(wW#`*>JCoD29|9w%Qv;56{ z&BTg8nPQ7;s&B%k7Oei+(jhZLaHg#4Dm~`V5&>qd%qx-m6ymP*Ty&NL+u0 z;}l=x&N|CLn_@zFJ$mt z;Zk|&qU9-@r|`}AC!D6>zvO9e#`5?>v)q5xIDguAp}r-pdm%4d^T7lI2_7ibrhk|} zz?+fDo*8%k1g38=*wzT5pt%*I33qmdXklR3)~E(#!ZI(qF7$ka&~+Hdgy*UNZ&o&t O6f+Pm0@CxCK|BCHnY;-A literal 0 HcmV?d00001 diff --git a/i2c/rtc_dallas_ds3231/ds3231_ex4.sr b/i2c/rtc_dallas_ds3231/ds3231_ex4.sr new file mode 100644 index 0000000000000000000000000000000000000000..826c841fca4b60434ae1fe5ce917fb6bbcf5f0fc GIT binary patch literal 920 zcmWIWW@h1H0Dyu17aYnPD961{s8RqRI+g3LD+Bu`;s^Yahg`1j#o z&6T=Kj6*z+hLsnrOp>fMFR?xF<(ae6ZUg5fYu~ooFY3wie5CBK+3nS~B<}DUr={AfbSzhYlLEN48vyGn-nO=Q&6$%Y45Q61;~_5G)BK=%u%Gca%h9hZ}z zo|&v`sB8E(>fyC!1&-SPvSd7v|3fO!#hmOLaJ##N6g|V z_G|x`5}$6GJ7;d~GlSi0d>-DI_MQLrgPlAdH?x0@7P`A?-ZI$_DJOH6%$Ds|?)~`Y z^TbD&=Y8vKw4BqkWr_Oi+{5cQC%iKa=?;G{cw}PA+4Q-mOm0jPch5=;4n3tYEqq4o zQXZoOb5|j8(>%*b+={k+Iqd>MQyK*x`T9;u+&kaOYw;(o+le2y^G$Kzt=F0JU3&9! zc6D8qd0}E*_paDVF`ryj=38JFP_yk7%YkoEyS48BHNSk$FL!U-wYF2Q8scX^*k$16 z$}b-KWdV8I>t?K2$S417Lr-g}?vz@YcU`USMH6amEG@b3^W`+; zG(Wc9ap>gHZf2J=FjCa+& z%lPk`Wng>xs_^ literal 0 HcmV?d00001 diff --git a/i2c/rtc_dallas_ds3231/ds3231_ex5.sr b/i2c/rtc_dallas_ds3231/ds3231_ex5.sr new file mode 100644 index 0000000000000000000000000000000000000000..af2b89af1edff1392c3d5ffee8fa4f8bca2f9546 GIT binary patch literal 709 zcmWIWW@h1H0D+P+t3cj;SEU$%Y!GG#;`R!qX3{P5e6m(4zMbh)9eSzfwFx- z%mKu?sU?Xii6x1;rw#d<4R{ z=Xrte)|%eB|2Xhi=kb!$PS=c9_5Z7i<@le*|L6AGN7*}W#=gvXRU1BU_Cg;0ZykX@ z9?yI9?zH`*%_n)DWwwj6UO7BF^q<$V85MPk&nK@G{gB-8*vb6yljL2girKFXO{+re zJlvLssqcO)D!uQ(-DNxUXWo1kEhOrqxAer;geUjrfXFC=B3+4{Vt@GN=Nx?e?(^?c z&qaa$Cl-8IXU7oW&B$cWj5|5N%-YrnVnGuJL=*1RfzYG|WWv%4x-Rr+L+Ap=BO($5 Syjj^mQp`ZO2uSlXfp`Evb@s~u literal 0 HcmV?d00001 From 476caaa3c2cbae77fdaaf8c15ce944c1f8263e41 Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann Date: Tue, 29 Sep 2020 23:01:04 +0200 Subject: [PATCH 2/2] initial upload of 3 examples for SSD1306 --- i2c/oled/README | 48 ++++++++++++++++++++++++++++++++++++++++ i2c/oled/ssd1306_ex1.sr | Bin 0 -> 1023 bytes i2c/oled/ssd1306_ex2.sr | Bin 0 -> 520 bytes i2c/oled/ssd1306_ex3.sr | Bin 0 -> 492 bytes 4 files changed, 48 insertions(+) create mode 100644 i2c/oled/README create mode 100644 i2c/oled/ssd1306_ex1.sr create mode 100644 i2c/oled/ssd1306_ex2.sr create mode 100644 i2c/oled/ssd1306_ex3.sr diff --git a/i2c/oled/README b/i2c/oled/README new file mode 100644 index 0000000..2c04c4d --- /dev/null +++ b/i2c/oled/README @@ -0,0 +1,48 @@ +------------------------------------------------------------------------------- +Solomon SSD1306 128 x 64 Dot Matrix OLED/PLED Driver +------------------------------------------------------------------------------- + +Details: + - SSD1306 datasheet: + http://www.solomon-systech.com/en/product/advanced-display/oled-display-driver-ic/ssd1306/ + + +The logic analyzer used was KeeYees USB Logic Analyzer 24 MHz 8CH +with fx2lafw firmware (at 500kHz): + + Probe DS3231 pin + ------------------------- + 0 SCL + 1 SDA + + +ssd1306_ex1.sr +---------------------- + +The file provides writing a standard init sequence and the transfer of first data bytes, +among others: + +- Display one +- Display off +- Set display mode +- Set start line +- Set address / segment mapping +- Set multiplexing +- Set vertical offset +- Set clock ration +- Set pre-charge +- Set contrast +- Set charge pump +- Set column and page range + + +ssd1306_ex2.sr +---------------------- + +Write the 5-parameter command 0x2a = set vertical and left horizontal scroll + + +ssd1306_ex3.sr +---------------------- + +Write the 2-parameter command 0x23 = set fade-out and blinking diff --git a/i2c/oled/ssd1306_ex1.sr b/i2c/oled/ssd1306_ex1.sr new file mode 100644 index 0000000000000000000000000000000000000000..88719d12754478fce3d5a9620eda9ef182988a1d GIT binary patch literal 1023 zcmWIWW@h1H00F03t3cj;SEU$%Y!GG#;`R!qX3{P5e6m(4zMbh)9eSzfwFx- z%mKu?sU?Xii6x1;rw#d<4R{6yv8hPsAt@7ykGRuEvg@c(~$Qq{?lqz;J8Dli zp8DRNxhrn@n-9N_K2AJ!>il`V`S)rvla2N2r+fYDPoFQx&mZW;&UJo|rL^>?=fAg= z?fLlT^4||vZvQravgX&@t?S>rewW{4XZT3$z75;fqkH_)zWeRZa=*6g-JBC%-{0K# zUYt^P!u@1PlZW{6EmJ+dul{OtDRbeu%h5tfW>co}DQn%`UY-7Y&3Qv57nsi zEjo8(SIe12X8OlGmpC;2*$(bPex8yuYu4P@-rjSc(KFk&*tYln?$eRcpTF#Tw(w!$ zIXy$QbBxXr9}g|ue4%jimac;~dfD#2q0`cq>2LmaartA>nj?R7ewp2WI_b`VYgD1UK5J|FnKD`J!Rp++|O1O`8_^Y_4_PSKAeiTGKA3Z$Eb6 zTY!k`%l|?a8LAs99vzO^{NC#EHSs{}S?c|j5;3u_x^IRG{;gV8wpRP?$IJ)5+b^Ed zUU{#0(b~Uzil!epR`J-PuU=$+@6WU8rt>aO?KbFp{Pxb#$NK9;9~-Om0VN+NS7bep zu4_JN*EhdtC*Sdpj(0A!fW#rl`o^iWmrTbCWsdvr=31Y7?2YSzkNi(xUVZp&Pmpr| zN!!*(|7-28n}HPToz3==0jiw79jF>eJp)m9wr!uVH-DED$UOc(!DhR!fkow)KZIy` zZ1HZt(t{s-KOFy^bv*yNdTArbVzZrK>-F+M)DDyNxdlL@V(uMd{wW^d&B$cWj5{L% z6CxOFYXniyYz5JTJ6}PxFfeRuR0A?$xeQ$wdV)vj0_Ffj@(=K4Wdlhu1K}bd?amD1 F0RX>nyl4Ob literal 0 HcmV?d00001 diff --git a/i2c/oled/ssd1306_ex2.sr b/i2c/oled/ssd1306_ex2.sr new file mode 100644 index 0000000000000000000000000000000000000000..077a0a8d1b40ad9952ab5aa593e701226de33c73 GIT binary patch literal 520 zcmWIWW@h1H00Fb9R)M_xu1YZi*&xgg#AT^P#hLkeMgc%oA`DCn9AH&0r`Zpb17-Vw zm;;D&Q%e$45=#yu17aYnPD961{s8RqRI+g3LD+Bu`;s^Yahg`1j#o z&6T=Kj6*z+hLsnrOp>fMFR?xF<(ae6ZUg5fYu~ooFY3wie5CBK+3nS~B<}DUr={AfbSzhYlLEN48vyGn-nO=Q&6$%Y45Q60xUZ}!DBprZuT85lT$bWVPH zX0ooKuHoDBj(jZ&JggUf-;cZ%sAOoh;)uoUlhxf$8b4dl+}B>}b9Iwj+L47&^{OfFA((fVIUJ84gub*Y#=FS NAY25b13;0@008kqobdnv literal 0 HcmV?d00001 diff --git a/i2c/oled/ssd1306_ex3.sr b/i2c/oled/ssd1306_ex3.sr new file mode 100644 index 0000000000000000000000000000000000000000..7d00611dfa1048ff6458007e4e519fc057d18b6d GIT binary patch literal 492 zcmWIWW@h1H0D+IwtO9xWU6o=4vO$;~h|5xoiZk=`i~@kFL>QPDIKZl0PO~2<2g>#V zF$WOmrj{h8B$g!Vo;KubHsEo%cz5{;)-EBHC3^QHs@RVt1etFtNS?yN=I0-}@$bXG znk#je7>9Ts4J$8LnIu_jUSfOT%QI)C-3HD}*1m1EU(}Q3`AFGev)ij}N!;NzPD|e} zi&