├── Control source ├── .vs │ └── TestMyBoard │ │ └── v14 │ │ └── .atsuo └── AVR_ touch_ control_OLED │ ├── README.md │ ├── TestMyBoard.atsln │ └── TestMyBoard │ ├── CS8406.c │ ├── CS8406.h │ ├── Debug │ └── TestMyBoard.hex │ ├── Summary.xml │ ├── Summary.xslt │ ├── TWI_HW_Master.c │ ├── TWI_HW_Master.h │ ├── TWI_SW_Master.c │ ├── TWI_SW_Master.h │ ├── TWI_driver.c │ ├── TWI_driver.h │ ├── TestMyBoard.componentinfo.xml │ ├── TestMyBoard.cproj │ ├── TestMyBoard.qtdgn │ ├── bits_macros.h │ ├── buttons.c │ ├── buttons.h │ ├── compilers_4.h │ ├── main.c │ ├── median.c │ ├── median.h │ ├── src │ ├── QTouch │ │ ├── BitBangSPI_Master.c │ │ ├── BitBangSPI_Master.h │ │ ├── QDebugSettings.h │ │ ├── QDebugTransport.c │ │ ├── QDebugTransport.h │ │ ├── QDebug_mega.c │ │ ├── QDebug_mega.h │ │ ├── Serial.c │ │ ├── Serial.h │ │ ├── libatmega328pb_qtouch_gcc.a │ │ └── touch_api_ptc.h │ ├── TWI_HW_Master.c │ ├── TWI_HW_Master.h │ ├── TWI_driver.c │ ├── TWI_driver.h │ ├── asf.h │ ├── compilers_4.h │ ├── ssd1306.c │ └── ssd1306.h │ ├── ssd1306.c │ ├── ssd1306.h │ ├── touch.c │ └── touch.h ├── DOCs ├── Datasheets │ ├── ATmega328-328P.pdf │ ├── ATmega328PB.pdf │ ├── ATmega328PB_Xplained_Mini_design_documentation.PDF │ ├── Atmel-42094-QTouch-Schematic-and-Layout-Checklist_ApplicationNote_AT02259.pdf │ ├── Atmel-42195-QTouch-Library-Peripheral-Touch-Controller_User-Guide.pdf │ ├── Atmel-42469-ATmega328PB-Xplained-Mini_User-Guide.pdf │ ├── Atmel-42482-Getting-Started-with-ATmega328PB_Application Note_AT08401.pdf │ ├── Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_ApplicationNote_AT15007.pdf │ ├── CS8406_F6.pdf │ ├── How to connect the AVR Xplained Mini to the Arduino IDE.pdf │ ├── atmel-42783-using-usart-to-wake-up-atmega328pb-from-sleep-mode_applicationnote_avr42783.pdf │ ├── doc8207.pdf │ └── vs1053.pdf ├── Structure diagram.docx ├── Structure diagram.pdf ├── Structure diagram.png ├── logo.bmp ├── logo.jpg ├── Соответствие PTC каналов GPIO портам.xlsx └── Формат отображения.xlsx ├── Photo ├── 1 photo.jpg ├── 2 photo.jpg ├── 20170609_091035.jpg ├── 3 photo.jpg ├── 4 photo.jpg ├── IMG_8502.JPG ├── IMG_8503.JPG ├── IMG_8504.JPG ├── IMG_8505.JPG ├── IMG_8543.JPG ├── IMG_8549.JPG ├── IMG_8566.JPG ├── IMG_8903.JPG ├── IMG_8904.JPG ├── IMG_8905.JPG └── IMG_8907.JPG ├── README.md └── Schematic and PCB ├── Control board ├── Control.PcbDoc ├── Control.PcbLib ├── Control.PrjPCB ├── Control.PrjPCBStructure ├── Control.SCHLIB ├── Control.SchDoc ├── History │ └── Control.~(1).PrjPCB.Zip ├── __Previews │ ├── Control.PcbDocPreview │ └── Control.SchDocPreview └── debug.log └── Main board ├── Main-board.dch ├── Main-board.dip ├── PCB_3D_view.step └── Scheme.pdf /Control source/.vs/TestMyBoard/v14/.atsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discover1977/Wi-Fi-WEB-radio/76efe2420358b8e045ecd9a206f43c56d1ca1edd/Control source/.vs/TestMyBoard/v14/.atsuo -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/README.md: -------------------------------------------------------------------------------- 1 | Warning!!! 2 | You need to configure the KaRadio to work with the control card. 3 | 4 | 5 | Using the UART interface, you need to configure: 6 | 1. The speed of the UART is 9600 baud. Command in terminal: sys.uart("9600") 7 | 2. Mode of operation of the interface I2S - "1" (96 кГц). Command in terminal: sys.i2s("1") 8 | 9 | Using the web interface, enable "Autoplay". 10 | 11 | After the settings, restart the KaRadio. -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard.atsln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Atmel Studio Solution File, Format Version 11.00 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "TestMyBoard", "TestMyBoard\TestMyBoard.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|AVR = Debug|AVR 11 | Release|AVR = Release|AVR 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR 15 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR 16 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR 17 | {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/CS8406.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discover1977/Wi-Fi-WEB-radio/76efe2420358b8e045ecd9a206f43c56d1ca1edd/Control source/AVR_ touch_ control_OLED/TestMyBoard/CS8406.c -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/CS8406.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discover1977/Wi-Fi-WEB-radio/76efe2420358b8e045ecd9a206f43c56d1ca1edd/Control source/AVR_ touch_ control_OLED/TestMyBoard/CS8406.h -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/Summary.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ATmega328PB 5 | 32 6 | Self Capacitance 7 | 8 | 9 | 4 10 | 0 11 | 1 12 | 13 | 14 | 7 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | B,C,D,E 27 | 12 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Disable 40 | 41 | 42 | 43 | libatmega328pb_qtouch_gcc.a 44 | 45 | 46 | 47 | 48 | 49 | 2048 50 | 786 51 | 1262 52 | 53 | 54 | 32768 55 | 15260 56 | 17508 57 | 58 | 59 | qtlib.generic.tmx.qt.atmega.device 60 | 61 | TOUCH_LIBRARY_DRIVEN 62 | NONE 63 | Four 64 | Zero 65 | NONE 66 | One 67 | Zero 68 | One,Two,Three 69 | Off 70 | 10 71 | 12 72 | Off 73 | 10 74 | 12 75 | Five 76 | SingleKeyLockout 77 | 10 78 | Three 79 | 80 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/Summary.xslt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 6 | 7 | 8 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 66 | 69 | 70 | 71 | 74 | 77 | 78 | 79 | 80 | 83 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 96 | 99 | 100 | 101 | 104 | 107 | 108 | 109 | 110 | 113 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 125 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 137 | 140 | 141 | 142 | 145 | 148 | 149 |
Device Information
64 | Device Name 65 | 67 | 68 |
72 | Device Variant 73 | 75 | 76 |
81 | Technology 82 | 84 | 85 |
Sensor Information
94 | Number Of Buttons 95 | 97 | 98 |
102 | Number Of Wheels 103 | 105 | 106 |
111 | Number Of Sliders 112 | 114 | 115 |
Channel Information
123 | Total Channels Consumed 124 | 126 | 127 |
Pin Configuration
135 | Available Ports 136 | 138 | 139 |
143 | Total Pins Used 144 | 146 | 147 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 172 | 175 | 178 | 181 | 184 | 185 | 186 |
Channel NoSeriesResistorPrescalarAutoOSFilterLevel
170 | 171 | 173 | 174 | 176 | 177 | 179 | 180 | 182 | 183 |
187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 208 | 211 | 214 | 217 | 218 | 219 | 220 | 221 | 224 | 227 | 230 | 233 | 234 | 235 | 236 | 237 |
Name of the sensorChannel NumberSensingPairPortPin
206 | 207 | 209 | 210 | 212 | 213 | 215 | 216 |
222 | 223 | 225 | 226 | 228 | 229 | 231 | 232 |
238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 254 | 257 | 258 | 259 | 260 | 261 | 264 | 267 | 268 | 269 | 270 | 271 |
SensorMoisture Group
252 | 253 | 255 | 256 |
262 | 263 | 265 | 266 |
272 |
273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 291 | 294 | 297 | 298 | 299 | 300 | 301 | 304 | 307 | 310 | 311 | 312 | 313 | 314 |
Moisture GroupSensor Moisture Lock ThresholdSystem Moisture Lock Threshold
289 | 290 | 292 | 293 | 295 | 296 |
302 | 303 | 305 | 306 | 308 | 309 |
315 |
316 | 317 | 318 | 319 | 320 | 321 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 333 | 336 | 337 | 338 | 339 | 340 | 343 | 346 | 347 | 348 | 349 | 350 | 351 | 354 | 357 | 358 |
322 | Debug Interface- 323 | Port Pin
331 | 332 | 334 | 335 |
341 | 342 | 344 | 345 |
352 | Power Analyzer 353 | 355 | 356 |
359 |
360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 |
373 | 374 | 377 | 380 | 383 | 386 | 387 | 388 | 391 | 394 | 397 | 400 | 401 |
Memory typeTotalUsedFree
375 | Data Memory 376 | 378 | 379 | 381 | 382 | 384 | 385 |
389 | Code Memory 390 | 392 | 393 | 395 | 396 | 398 | 399 |
402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 414 | 417 | 418 | 419 | 422 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 434 | 437 | 438 | 446 | 454 | 455 | 458 | 461 | 462 | 478 | 479 | 482 | 485 | 486 | 487 | 490 | 493 | 494 | 495 | 496 | 499 | 502 | 503 | 504 | 505 | 506 | 509 | 512 | 513 | 514 | 515 | 516 | 519 | 522 | 523 | 524 | 525 | 526 | 529 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 542 | 545 | 546 | 547 | 550 | 553 | 554 | 555 | 556 | 559 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 571 | 574 | 575 | 576 | 577 | 580 | 583 | 584 | 585 | 588 | 591 | 592 | 593 | 594 | 597 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 610 | 613 | 614 | 615 | 616 | 619 | 622 | 623 | 624 |
Library Information
412 | Tool Chain Name 413 | 415 | 416 |
420 | Default Library 421 | 423 | 424 |
Other Options
432 | Frequency Mode 433 | 435 | 436 |
456 | Auto Tuning 457 | 459 | 460 |
480 | Frequency Hops 481 | 483 | 484 |
488 | PTC Interrupt Priority Level 489 | 491 | 492 |
497 | Sensor Post Processing Mode 498 | 500 | 501 |
507 | Quick Reburst Enabled Status 508 | 510 | 511 |
517 | Touch FMEA Test Status 518 | 520 | 521 |
527 | Safety FMEA Time Period 528 | 530 | 531 |
Frequency Autotune Parameters
540 | Frequency Autotune Status 541 | 543 | 544 |
548 | Frequency Autotuning Signal Limit 549 | 551 | 552 |
557 | Frequency Autotune in Count 558 | 560 | 561 |
Noise Measurement Parameters
569 | Noise Measurement Status 570 | 572 | 573 |
578 | Noise Measurement Signal Stability Limit 579 | 581 | 582 |
586 | Noise Measurement Noise Limit 587 | 589 | 590 |
595 | Noise Measurement Buffer Count 596 | 598 | 599 |
Lockout Parameters
608 | Lockout Status 609 | 611 | 612 |
617 | Lockout Countdown 618 | 620 | 621 |
625 | 626 | 627 |
628 |
629 | 630 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_HW_Master.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discover1977/Wi-Fi-WEB-radio/76efe2420358b8e045ecd9a206f43c56d1ca1edd/Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_HW_Master.c -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_HW_Master.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discover1977/Wi-Fi-WEB-radio/76efe2420358b8e045ecd9a206f43c56d1ca1edd/Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_HW_Master.h -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_SW_Master.c: -------------------------------------------------------------------------------- 1 | /* 2 | * i2c-soft.c 3 | * 4 | * Created on: 19.12.2009 5 | * Author: Pavel V. Gololobov 6 | */ 7 | #include 8 | #include "TWI_SW_Master.h" 9 | 10 | //------------------------------------------------------------------ 11 | // I2C Speed Down 12 | //------------------------------------------------------------------ 13 | #define I2CWAIT TWI_SW_Wait(1); 14 | 15 | //------------------------------------------------------------------ 16 | // I2C Delay 17 | //------------------------------------------------------------------ 18 | void TWI_SW_Wait(unsigned int n) 19 | { 20 | do 21 | { 22 | asm("nop"); 23 | //asm("nop"); 24 | //asm("nop"); 25 | //asm("nop"); 26 | //asm("nop"); 27 | } 28 | while(--n); 29 | } 30 | 31 | //------------------------------------------------------------------ 32 | // I2C SDA SCL Control 33 | //------------------------------------------------------------------ 34 | static void SetLowSDA() 35 | { 36 | I2CDIR |= SDA; 37 | I2CWAIT 38 | } 39 | static void SetHighSDA() 40 | { 41 | I2CDIR &= ~SDA; 42 | I2CWAIT 43 | } 44 | 45 | static void SetLowSCL() 46 | { 47 | I2COUT &= ~SCL; 48 | I2CWAIT 49 | } 50 | static void SetHighSCL() 51 | { 52 | I2COUT |= SCL; 53 | I2CWAIT 54 | } 55 | 56 | //------------------------------------------------------------------ 57 | // I2C Initialize Bus 58 | //------------------------------------------------------------------ 59 | void TWI_SW_Init() 60 | { 61 | I2CSEL &= ~SDA; 62 | I2CSEL &= ~SCL; 63 | 64 | I2COUT &= ~SCL; 65 | I2COUT &= ~SDA; 66 | 67 | I2CDIR |= SCL; 68 | I2CDIR &= ~SDA; 69 | 70 | SetHighSCL(); 71 | SetLowSDA(); 72 | SetHighSDA(); 73 | } 74 | 75 | //------------------------------------------------------------------ 76 | // I2C Start Data Transfer 77 | //------------------------------------------------------------------ 78 | void TWI_SW_Start() 79 | { 80 | SetHighSCL(); 81 | SetHighSDA(); 82 | 83 | SetHighSCL(); 84 | SetLowSDA(); 85 | 86 | SetLowSCL(); 87 | SetHighSDA(); 88 | } 89 | 90 | //------------------------------------------------------------------ 91 | // I2C Stop Transfer 92 | //------------------------------------------------------------------ 93 | void TWI_SW_Stop() 94 | { 95 | SetLowSCL(); 96 | SetLowSDA(); 97 | 98 | SetHighSCL(); 99 | SetLowSDA(); 100 | 101 | SetHighSCL(); 102 | SetHighSDA(); 103 | } 104 | 105 | //------------------------------------------------------------------ 106 | // I2C Write Transfer 107 | //------------------------------------------------------------------ 108 | unsigned int TWI_SW_Write(unsigned int a) 109 | { 110 | unsigned int i; 111 | unsigned int return_ack; 112 | 113 | for (i = 0; i < 8; i++) 114 | { 115 | SetLowSCL(); 116 | if (a & 0x80) 117 | SetHighSDA(); 118 | else 119 | SetLowSDA(); 120 | 121 | SetHighSCL(); 122 | a <<= 1; 123 | } 124 | SetLowSCL(); 125 | 126 | /* ack Read */ 127 | SetHighSDA(); 128 | SetHighSCL(); 129 | 130 | if (I2CIN & SDA) 131 | return_ack = NO_TWI_SW_ACK; 132 | else 133 | return_ack = OK_TWI_SW_ACK; 134 | 135 | SetLowSCL(); 136 | 137 | return (return_ack); 138 | } 139 | 140 | //------------------------------------------------------------------ 141 | // I2C Read Transfer 142 | //------------------------------------------------------------------ 143 | unsigned int TWI_SW_Read(unsigned int ack) 144 | { 145 | unsigned int i; 146 | unsigned int caracter = 0x00; 147 | 148 | SetLowSCL(); 149 | SetHighSDA(); 150 | 151 | for (i = 0; i < 8; i++) 152 | { 153 | caracter = caracter << 1; 154 | SetHighSCL(); 155 | if (I2CIN & SDA) 156 | caracter = caracter + 1; 157 | 158 | SetLowSCL(); 159 | } 160 | 161 | if (ack) 162 | { 163 | SetLowSDA(); 164 | } 165 | SetHighSCL(); 166 | SetLowSCL(); 167 | 168 | return (caracter); 169 | } 170 | 171 | //------------------------------------------------------------------ 172 | // I2C Read Byte 173 | //------------------------------------------------------------------ 174 | unsigned int TWI_SW_ReadByte(unsigned int nAddress, unsigned int nRegister) 175 | { 176 | TWI_SW_Start(); 177 | TWI_SW_Write(nAddress); 178 | TWI_SW_Write(nRegister); 179 | TWI_SW_Start(); 180 | TWI_SW_Write(nAddress | 0x01); 181 | uint8_t ret = TWI_SW_Read(0); 182 | TWI_SW_Stop(); 183 | 184 | return ret; 185 | } 186 | 187 | //------------------------------------------------------------------ 188 | // I2C Write Byte 189 | //------------------------------------------------------------------ 190 | void TWI_SW_WriteByte(unsigned int nAddress, unsigned int nRegister, unsigned int nValue) 191 | { 192 | TWI_SW_Start(); 193 | TWI_SW_Write(nAddress); 194 | TWI_SW_Write(nRegister); 195 | TWI_SW_Write(nValue); 196 | TWI_SW_Stop(); 197 | } 198 | 199 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_SW_Master.h: -------------------------------------------------------------------------------- 1 | /* 2 | * i2c-soft.h 3 | * 4 | * Created on: 19.12.2009 5 | * Author: Pavel V. Gololobov 6 | */ 7 | 8 | #ifndef TWI_SW_SW_H_ 9 | #define TWI_SW_SW_H_ 10 | 11 | #include 12 | 13 | #define NO_TWI_SW_ACK 0 14 | #define OK_TWI_SW_ACK 1 15 | 16 | #ifndef SDA 17 | #define I2COUT PORTC // Write to Port 18 | #define I2CIN PINC // Read from Port 19 | #define I2CDIR DDRC // Set Port Direction 20 | #define I2CSEL PORTC // Alternative Port Fuctions 21 | 22 | #define SDA (1 << 4) // Serial Data Line 23 | #define SCL (1 << 5) // Serial Clock Line 24 | #endif 25 | 26 | // Init Bus 27 | void TWI_SW_Init(); 28 | // Start Transfer 29 | void TWI_SW_Start(); 30 | // Stop Transfer 31 | void TWI_SW_Stop(); 32 | // Write Transfer 33 | unsigned int TWI_SW_Write(unsigned int a); 34 | // Read Transfer 35 | unsigned int TWI_SW_Read(unsigned int ack); 36 | 37 | // Read Byte 38 | unsigned int TWI_SW_ReadByte(unsigned int nAddress, unsigned int nRegister); 39 | // Write Byte 40 | void TWI_SW_WriteByte(unsigned int nAddress, unsigned int nRegister, unsigned int nValue); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_driver.c: -------------------------------------------------------------------------------- 1 | #include "TWI_driver.h" 2 | 3 | // Init Bus 4 | void TWI_Init() 5 | { 6 | #ifdef HW 7 | I2C_HW_Init(); 8 | #else 9 | i2c_Init(); 10 | #endif 11 | } 12 | 13 | // Start Transfer 14 | void TWI_Start() 15 | { 16 | #ifdef HW 17 | I2C_HW_Start(); 18 | #else 19 | i2c_Start(); 20 | #endif 21 | } 22 | 23 | // Stop Transfer 24 | void TWI_Stop() 25 | { 26 | #ifdef HW 27 | 28 | #else 29 | i2c_Stop(); 30 | #endif 31 | } 32 | 33 | // Write Transfer 34 | unsigned int TWI_Write(unsigned int a) 35 | { 36 | #ifdef HW 37 | 38 | #else 39 | unsigned int i2c_Write(unsigned int a); 40 | #endif 41 | } 42 | 43 | // Read Transfer 44 | unsigned int TWI_Read(unsigned int ack) 45 | { 46 | #ifdef HW 47 | 48 | #else 49 | unsigned int i2c_Read(unsigned int ack); 50 | #endif 51 | } 52 | 53 | // Read Byte 54 | unsigned int TWI_ReadByte(unsigned int nAddress, unsigned int nRegister) 55 | { 56 | #ifdef HW 57 | 58 | #else 59 | unsigned int i2c_ReadByte(unsigned int nAddress, unsigned int nRegister); 60 | #endif 61 | } 62 | 63 | // Write Byte 64 | void TWI_WriteByte(unsigned int nAddress, unsigned int nRegister, unsigned int nValue) 65 | { 66 | #ifdef HW 67 | 68 | #else 69 | void i2c_WriteByte(unsigned int nAddress, unsigned int nRegister, unsigned int nValue); 70 | #endif 71 | } -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TWI_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TWI_driver.h 3 | * 4 | * Created on: 30.05.2017 5 | * Author: Gavrilov I. 6 | */ 7 | 8 | #ifndef TWI_DRIVER_H_ 9 | #define TWI_DRIVER_H_ 10 | 11 | //#define HW 12 | 13 | #ifdef HW 14 | #include "TWI_HW_Master.h" 15 | #else 16 | #include "TWI_SW_Master.h" 17 | #endif 18 | 19 | // Init Bus 20 | void TWI_Init(); 21 | // Start Transfer 22 | void TWI_Start(); 23 | // Stop Transfer 24 | void TWI_Stop(); 25 | // Write Transfer 26 | unsigned int TWI_Write(unsigned int a); 27 | // Read Transfer 28 | unsigned int TWI_Read(unsigned int ack); 29 | 30 | // Read Byte 31 | unsigned int TWI_ReadByte(unsigned int nAddress, unsigned int nRegister); 32 | // Write Byte 33 | void TWI_WriteByte(unsigned int nAddress, unsigned int nRegister, unsigned int nValue); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TestMyBoard.componentinfo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Device 8 | Startup 9 | 10 | 11 | Atmel 12 | 1.1.0 13 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs 14 | 15 | 16 | 17 | 18 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\include 19 | 20 | include 21 | C 22 | 23 | 24 | include 25 | 26 | 27 | 28 | 29 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\include\avr\iom328pb.h 30 | 31 | header 32 | C 33 | ttTgm8x9iFoM7tg/KM7Urw== 34 | 35 | include/avr/iom328pb.h 36 | 37 | 38 | 39 | 40 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\templates\main.c 41 | template 42 | source 43 | C Exe 44 | 8xF+H5wEiuL0EThTvkQOkg== 45 | 46 | templates/main.c 47 | Main file (.c) 48 | 49 | 50 | 51 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\templates\main.cpp 52 | template 53 | source 54 | C Exe 55 | YXFphlh0CtZJU+ebktABgQ== 56 | 57 | templates/main.cpp 58 | Main file (.cpp) 59 | 60 | 61 | 62 | C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.1.130\gcc\dev\atmega328pb 63 | 64 | libraryPrefix 65 | GCC 66 | 67 | 68 | gcc/dev/atmega328pb 69 | 70 | 71 | 72 | 73 | ATmega_DFP 74 | C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.1.130/Atmel.ATmega_DFP.pdsc 75 | 1.1.130 76 | true 77 | ATmega328PB 78 | 79 | 80 | 81 | Resolved 82 | Fixed 83 | true 84 | 85 | 86 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TestMyBoard.cproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2.0 5 | 7.0 6 | dce6c7e3-ee26-4d79-826b-08594b9ad897 7 | ATmega328PB 8 | none 9 | com.Atmel.AVRGCC8.C 10 | Executable 11 | C 12 | $(MSBuildProjectName) 13 | .elf 14 | $(MSBuildProjectDirectory)\$(Configuration) 15 | Native 16 | TestMyBoard 17 | TestMyBoard 18 | TestMyBoard 19 | true 20 | false 21 | true 22 | true 23 | 0x20000000 24 | 25 | false 26 | exception_table 27 | 2 28 | 0 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | com.atmel.avrdbg.tool.medbg 58 | ATML2523030200003790 59 | 0x1E9516 60 | 61 | 62 | 63 | 64 | ISP 65 | 66 | com.atmel.avrdbg.tool.medbg 67 | ATML2523030200003790 68 | mEDBG 69 | 70 | ISP 71 | 72 | 73 | 74 | 75 | -mmcu=atmega328pb -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\gcc\dev\atmega328pb" 76 | True 77 | True 78 | True 79 | True 80 | False 81 | True 82 | True 83 | 84 | 85 | NDEBUG 86 | F_CPU=11059200 87 | 88 | 89 | 90 | 91 | %24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\include 92 | ../src/QTouch 93 | .. 94 | 95 | 96 | Optimize for size (-Os) 97 | True 98 | True 99 | True 100 | 101 | 102 | libatmega328pb_qtouch_gcc 103 | libm 104 | 105 | 106 | 107 | 108 | ../src/QTouch 109 | 110 | 111 | 112 | 113 | %24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\include 114 | ../src/QTouch 115 | .. 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -mmcu=atmega328pb -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\gcc\dev\atmega328pb" 125 | True 126 | True 127 | True 128 | True 129 | False 130 | True 131 | True 132 | 133 | 134 | F_CPU=11059200UL 135 | 136 | 137 | 138 | 139 | %24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\include 140 | ../src/QTouch 141 | .. 142 | 143 | 144 | Optimize for size (-Os) 145 | True 146 | True 147 | Maximum (-g3) 148 | True 149 | True 150 | 151 | 152 | libatmega328pb_qtouch_gcc 153 | libm 154 | 155 | 156 | 157 | 158 | ../src/QTouch 159 | 160 | 161 | 162 | 163 | %24(PackRepoDir)\atmel\ATmega_DFP\1.1.130\include 164 | ../src/QTouch 165 | .. 166 | 167 | 168 | Default (-Wa,-g) 169 | 170 | 171 | 172 | 173 | 174 | compile 175 | 176 | 177 | none 178 | QTouchFileGenerator 179 | 180 | 181 | 182 | 183 | compile 184 | 185 | 186 | compile 187 | 188 | 189 | compile 190 | 191 | 192 | compile 193 | 194 | 195 | compile 196 | 197 | 198 | compile 199 | 200 | 201 | compile 202 | 203 | 204 | compile 205 | 206 | 207 | compile 208 | 209 | 210 | compile 211 | 212 | 213 | compile 214 | 215 | 216 | compile 217 | 218 | 219 | compile 220 | 221 | 222 | compile 223 | 224 | 225 | compile 226 | 227 | 228 | compile 229 | 230 | 231 | compile 232 | 233 | 234 | compile 235 | 236 | 237 | compile 238 | 239 | 240 | compile 241 | 242 | 243 | compile 244 | 245 | 246 | compile 247 | 248 | 249 | compile 250 | 251 | 252 | compile 253 | 254 | 255 | compile 256 | TestMyBoard.qtdgn 257 | 258 | 259 | compile 260 | TestMyBoard.qtdgn 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | -------------------------------------------------------------------------------- /Control source/AVR_ touch_ control_OLED/TestMyBoard/TestMyBoard.qtdgn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |