├── .gitignore
├── README.md
├── eagle
├── untitled.brd
└── untitled.sch
├── gui
├── arduino.cpp
├── arduino.h
├── gui.pro
├── icon.ico
├── icon.rc
├── main.cpp
├── mainwindow.cpp
├── mainwindow.h
└── mainwindow.ui
├── imgs
├── sch.png
├── ubuntu_mate.png
└── win.png
└── sketch
└── sketch.ino
/.gitignore:
--------------------------------------------------------------------------------
1 | build*
2 | *.user
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Programmer for EPROM 27 series (16-512) based on Arduino
2 |
3 | *You can download the stable version on the "Releases" tab. It guarantees a working version of the source code, compiled by the GUI for Windows and a sketch for arduino.*
4 |
5 | Compatible Chips List (not all chips are tested):
6 |
7 | * 27C16 (connects from 3 to 26 leg DIP28 socket)
8 | * 27C32 (connects from 3 to 26 leg DIP28 socket)
9 | * 27C64
10 | * 27C128
11 | * 27C256
12 | * 27C512
13 |
14 | Before write, check programming voltage in datasheet!
15 |
16 | # Schematic
17 |
18 | Based on the project: https://github.com/bouletmarc/BMBurner
19 |
20 | 
21 |
22 | PCB divorced using autotracer. Not yet tested, but the prototype is working properly.
23 |
24 | *Resistors R1 and R2 are indicated in the Arduino firmware. By default, the values are 10 kOhm and 1.5 kOhm.*
25 |
26 | # Software
27 |
28 | Software for PC written by Qt5.
29 |
30 | Functions:
31 |
32 | * Read chip
33 | * Write chip
34 | * Verify and check for write (no bits to be set to 1)
35 | * Programming voltage control (for AVR in TQFP case)
36 |
37 | 
38 |
39 | Requared Windows 7 or later.
40 |
41 | 
42 |
--------------------------------------------------------------------------------
/eagle/untitled.brd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | <b>Diodes</b><p>
77 | Based on the following sources:
78 | <ul>
79 | <li>Motorola : www.onsemi.com
80 | <li>Fairchild : www.fairchildsemi.com
81 | <li>Philips : www.semiconductors.com
82 | <li>Vishay : www.vishay.de
83 | </ul>
84 | <author>Created by librarian@cadsoft.de</author>
85 |
86 |
87 | <B>DIODE</B><p>
88 | diameter 2 mm, horizontal, grid 10.16 mm
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | >NAME
109 | >VALUE
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | DIODE
118 | diameter 2 mm, horizontal, grid 10.16 mm
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | <b>TTL Devices, 74xx Series with European Symbols</b><p>
127 | Based on the following sources:
128 | <ul>
129 | <li>Texas Instruments <i>TTL Data Book</i> Volume 1, 1996.
130 | <li>TTL Data Book, Volume 2 , 1993
131 | <li>National Seminconductor Databook 1990, ALS/LS Logic
132 | <li>ttl 74er digital data dictionary, ECA Electronic + Acustic GmbH, ISBN 3-88109-032-0
133 | <li>http://icmaster.com/ViewCompare.asp
134 | </ul>
135 | <author>Created by librarian@cadsoft.de</author>
136 |
137 |
138 | <b>Small Outline package</b> 150 mil
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 | >VALUE
168 | >NAME
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 | Small Outline package 150 mil
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 | <b>Generic Memories</b><p>
198 | <author>Created by librarian@cadsoft.de</author>
199 |
200 |
201 | <b>Dual In Line Package</b>
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 | >NAME
237 | >VALUE
238 |
239 |
240 |
241 |
242 | Dual In Line Package
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 | <b>Jacks</b><p>
251 | Power Connectors<br>
252 | Phone Connectors<br>
253 | Cinch Connectors<br>
254 | <author>Created by librarian@cadsoft.de</author>
255 |
256 |
257 | <b>DC POWER JACK 2.5mm</b> Right Angle, Through Hole, Rated 5A at 16VDC, PC Terminals<p>
258 | Source: www.spctechnology.com .. 84N1162.pdf<br>
259 | Distributor: <b>Farnell (www.Farnell.de)</b><br>
260 | Created by Robert Siegler
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 | >VALUE
310 | >NAME
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 | DC POWER JACK 2.5mm Right Angle, Through Hole, Rated 5A at 16VDC, PC Terminals
319 | Source: www.spctechnology.com .. 84N1162.pdf
320 | Distributor: Farnell (www.Farnell.de)
321 | Created by Robert Siegler
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 | <b>PNP Transistors</b><p>
330 | <author>Created by librarian@cadsoft.de</author>
331 |
332 |
333 | <b>TO-92</b>
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 | >NAME
347 | >VALUE
348 | 1
349 | 2
350 | 3
351 |
352 |
353 |
354 |
355 | TO-92
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 | <b>NPN Transistors</b><p>
364 | <author>Created by librarian@cadsoft.de</author>
365 |
366 |
367 | <b>TO 92</b>
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 | >NAME
382 | >VALUE
383 | 2
384 | 3
385 | 1
386 |
387 |
388 |
389 |
390 | TO 92
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 | <b>Resistors, Capacitors, Inductors</b><p>
399 | Based on the previous libraries:
400 | <ul>
401 | <li>r.lbr
402 | <li>cap.lbr
403 | <li>cap-fe.lbr
404 | <li>captant.lbr
405 | <li>polcap.lbr
406 | <li>ipc-smd.lbr
407 | </ul>
408 | All SMD packages are defined according to the IPC specifications and CECC<p>
409 | <author>Created by librarian@cadsoft.de</author><p>
410 | <p>
411 | for Electrolyt Capacitors see also :<p>
412 | www.bccomponents.com <p>
413 | www.panasonic.com<p>
414 | www.kemet.com<p>
415 | http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b>
416 | <p>
417 | for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p>
418 |
419 | <table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0>
420 | <tr valign="top">
421 |
422 | <! <td width="10"> </td>
423 | <td width="90%">
424 |
425 | <b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b>
426 | <P>
427 | <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
428 | <TR>
429 | <TD COLSPAN=8>
430 | <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT>
431 | </TD>
432 | </TR>
433 | <TR>
434 | <TD ALIGN=CENTER>
435 | <B>
436 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT>
437 | </B>
438 | </TD>
439 | <TD ALIGN=CENTER>
440 | <B>
441 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI TECH</FONT>
442 | </B>
443 | </TD>
444 | <TD ALIGN=CENTER>
445 | <B>
446 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT>
447 | </B>
448 | </TD>
449 | <TD ALIGN=CENTER>
450 | <B>
451 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT>
452 | </B>
453 | </TD>
454 | <TD ALIGN=CENTER>
455 | <B>
456 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT>
457 | </B>
458 | </TD>
459 | <TD ALIGN=CENTER>
460 | <B>
461 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT>
462 | </B>
463 | </TD>
464 | <TD ALIGN=CENTER>
465 | <B>
466 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT>
467 | </B>
468 | </TD>
469 | <TD ALIGN=CENTER>
470 | <B>
471 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT>
472 | </B>
473 | </TD><TD> </TD>
474 | </TR>
475 | <TR>
476 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 >
477 | 3005P<BR>
478 | 3006P<BR>
479 | 3006W<BR>
480 | 3006Y<BR>
481 | 3009P<BR>
482 | 3009W<BR>
483 | 3009Y<BR>
484 | 3057J<BR>
485 | 3057L<BR>
486 | 3057P<BR>
487 | 3057Y<BR>
488 | 3059J<BR>
489 | 3059L<BR>
490 | 3059P<BR>
491 | 3059Y<BR></FONT>
492 | </TD>
493 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
494 | -<BR>
495 | 89P<BR>
496 | 89W<BR>
497 | 89X<BR>
498 | 89PH<BR>
499 | 76P<BR>
500 | 89XH<BR>
501 | 78SLT<BR>
502 | 78L ALT<BR>
503 | 56P ALT<BR>
504 | 78P ALT<BR>
505 | T8S<BR>
506 | 78L<BR>
507 | 56P<BR>
508 | 78P<BR></FONT>
509 | </TD>
510 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
511 | -<BR>
512 | T18/784<BR>
513 | 783<BR>
514 | 781<BR>
515 | -<BR>
516 | -<BR>
517 | -<BR>
518 | 2199<BR>
519 | 1697/1897<BR>
520 | 1680/1880<BR>
521 | 2187<BR>
522 | -<BR>
523 | -<BR>
524 | -<BR>
525 | -<BR></FONT>
526 | </TD>
527 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
528 | -<BR>
529 | 8035EKP/CT20/RJ-20P<BR>
530 | -<BR>
531 | RJ-20X<BR>
532 | -<BR>
533 | -<BR>
534 | -<BR>
535 | 1211L<BR>
536 | 8012EKQ ALT<BR>
537 | 8012EKR ALT<BR>
538 | 1211P<BR>
539 | 8012EKJ<BR>
540 | 8012EKL<BR>
541 | 8012EKQ<BR>
542 | 8012EKR<BR></FONT>
543 | </TD>
544 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
545 | -<BR>
546 | 2101P<BR>
547 | 2101W<BR>
548 | 2101Y<BR>
549 | -<BR>
550 | -<BR>
551 | -<BR>
552 | -<BR>
553 | -<BR>
554 | -<BR>
555 | -<BR>
556 | -<BR>
557 | 2102L<BR>
558 | 2102S<BR>
559 | 2102Y<BR></FONT>
560 | </TD>
561 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
562 | -<BR>
563 | EVMCOG<BR>
564 | -<BR>
565 | -<BR>
566 | -<BR>
567 | -<BR>
568 | -<BR>
569 | -<BR>
570 | -<BR>
571 | -<BR>
572 | -<BR>
573 | -<BR>
574 | -<BR>
575 | -<BR>
576 | -<BR></FONT>
577 | </TD>
578 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
579 | -<BR>
580 | 43P<BR>
581 | 43W<BR>
582 | 43Y<BR>
583 | -<BR>
584 | -<BR>
585 | -<BR>
586 | -<BR>
587 | 40L<BR>
588 | 40P<BR>
589 | 40Y<BR>
590 | 70Y-T602<BR>
591 | 70L<BR>
592 | 70P<BR>
593 | 70Y<BR></FONT>
594 | </TD>
595 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
596 | -<BR>
597 | -<BR>
598 | -<BR>
599 | -<BR>
600 | -<BR>
601 | -<BR>
602 | -<BR>
603 | -<BR>
604 | RT/RTR12<BR>
605 | RT/RTR12<BR>
606 | RT/RTR12<BR>
607 | -<BR>
608 | RJ/RJR12<BR>
609 | RJ/RJR12<BR>
610 | RJ/RJR12<BR></FONT>
611 | </TD>
612 | </TR>
613 | <TR>
614 | <TD COLSPAN=8>
615 | </TD>
616 | </TR>
617 | <TR>
618 | <TD COLSPAN=8>
619 | <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT>
620 | </TD>
621 | </TR>
622 | <TR>
623 | <TD ALIGN=CENTER>
624 | <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT>
625 | </TD>
626 | <TD ALIGN=CENTER>
627 | <FONT SIZE=3 FACE=ARIAL><B>BI TECH</B></FONT>
628 | </TD>
629 | <TD ALIGN=CENTER>
630 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT>
631 | </TD>
632 | <TD ALIGN=CENTER>
633 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT>
634 | </TD>
635 | <TD ALIGN=CENTER>
636 | <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT>
637 | </TD>
638 | <TD ALIGN=CENTER>
639 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT>
640 | </TD>
641 | <TD ALIGN=CENTER>
642 | <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT>
643 | </TD>
644 | <TD ALIGN=CENTER>
645 | <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT>
646 | </TD>
647 | </TR>
648 | <TR>
649 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
650 | 3250L<BR>
651 | 3250P<BR>
652 | 3250W<BR>
653 | 3250X<BR>
654 | 3252P<BR>
655 | 3252W<BR>
656 | 3252X<BR>
657 | 3260P<BR>
658 | 3260W<BR>
659 | 3260X<BR>
660 | 3262P<BR>
661 | 3262W<BR>
662 | 3262X<BR>
663 | 3266P<BR>
664 | 3266W<BR>
665 | 3266X<BR>
666 | 3290H<BR>
667 | 3290P<BR>
668 | 3290W<BR>
669 | 3292P<BR>
670 | 3292W<BR>
671 | 3292X<BR>
672 | 3296P<BR>
673 | 3296W<BR>
674 | 3296X<BR>
675 | 3296Y<BR>
676 | 3296Z<BR>
677 | 3299P<BR>
678 | 3299W<BR>
679 | 3299X<BR>
680 | 3299Y<BR>
681 | 3299Z<BR></FONT>
682 | </TD>
683 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
684 | -<BR>
685 | 66P ALT<BR>
686 | 66W ALT<BR>
687 | 66X ALT<BR>
688 | 66P ALT<BR>
689 | 66W ALT<BR>
690 | 66X ALT<BR>
691 | -<BR>
692 | 64W ALT<BR>
693 | -<BR>
694 | 64P ALT<BR>
695 | 64W ALT<BR>
696 | 64X ALT<BR>
697 | 64P<BR>
698 | 64W<BR>
699 | 64X<BR>
700 | 66X ALT<BR>
701 | 66P ALT<BR>
702 | 66W ALT<BR>
703 | 66P<BR>
704 | 66W<BR>
705 | 66X<BR>
706 | 67P<BR>
707 | 67W<BR>
708 | 67X<BR>
709 | 67Y<BR>
710 | 67Z<BR>
711 | 68P<BR>
712 | 68W<BR>
713 | 68X<BR>
714 | 67Y ALT<BR>
715 | 67Z ALT<BR></FONT>
716 | </TD>
717 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
718 | 5050<BR>
719 | 5091<BR>
720 | 5080<BR>
721 | 5087<BR>
722 | -<BR>
723 | -<BR>
724 | -<BR>
725 | -<BR>
726 | -<BR>
727 | -<BR>
728 | -<BR>
729 | T63YB<BR>
730 | T63XB<BR>
731 | -<BR>
732 | -<BR>
733 | -<BR>
734 | 5887<BR>
735 | 5891<BR>
736 | 5880<BR>
737 | -<BR>
738 | -<BR>
739 | -<BR>
740 | T93Z<BR>
741 | T93YA<BR>
742 | T93XA<BR>
743 | T93YB<BR>
744 | T93XB<BR>
745 | -<BR>
746 | -<BR>
747 | -<BR>
748 | -<BR>
749 | -<BR></FONT>
750 | </TD>
751 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
752 | -<BR>
753 | -<BR>
754 | -<BR>
755 | -<BR>
756 | -<BR>
757 | -<BR>
758 | -<BR>
759 | -<BR>
760 | -<BR>
761 | -<BR>
762 | 8026EKP<BR>
763 | 8026EKW<BR>
764 | 8026EKM<BR>
765 | 8026EKP<BR>
766 | 8026EKB<BR>
767 | 8026EKM<BR>
768 | 1309X<BR>
769 | 1309P<BR>
770 | 1309W<BR>
771 | 8024EKP<BR>
772 | 8024EKW<BR>
773 | 8024EKN<BR>
774 | RJ-9P/CT9P<BR>
775 | RJ-9W<BR>
776 | RJ-9X<BR>
777 | -<BR>
778 | -<BR>
779 | -<BR>
780 | -<BR>
781 | -<BR>
782 | -<BR>
783 | -<BR></FONT>
784 | </TD>
785 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
786 | -<BR>
787 | -<BR>
788 | -<BR>
789 | -<BR>
790 | -<BR>
791 | -<BR>
792 | -<BR>
793 | -<BR>
794 | -<BR>
795 | -<BR>
796 | 3103P<BR>
797 | 3103Y<BR>
798 | 3103Z<BR>
799 | 3103P<BR>
800 | 3103Y<BR>
801 | 3103Z<BR>
802 | -<BR>
803 | -<BR>
804 | -<BR>
805 | -<BR>
806 | -<BR>
807 | -<BR>
808 | 3105P/3106P<BR>
809 | 3105W/3106W<BR>
810 | 3105X/3106X<BR>
811 | 3105Y/3106Y<BR>
812 | 3105Z/3105Z<BR>
813 | 3102P<BR>
814 | 3102W<BR>
815 | 3102X<BR>
816 | 3102Y<BR>
817 | 3102Z<BR></FONT>
818 | </TD>
819 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
820 | -<BR>
821 | -<BR>
822 | -<BR>
823 | -<BR>
824 | -<BR>
825 | -<BR>
826 | -<BR>
827 | -<BR>
828 | -<BR>
829 | -<BR>
830 | -<BR>
831 | -<BR>
832 | -<BR>
833 | -<BR>
834 | -<BR>
835 | -<BR>
836 | -<BR>
837 | -<BR>
838 | -<BR>
839 | -<BR>
840 | -<BR>
841 | -<BR>
842 | EVMCBG<BR>
843 | EVMCCG<BR>
844 | -<BR>
845 | -<BR>
846 | -<BR>
847 | -<BR>
848 | -<BR>
849 | -<BR>
850 | -<BR>
851 | -<BR></FONT>
852 | </TD>
853 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
854 | 55-1-X<BR>
855 | 55-4-X<BR>
856 | 55-3-X<BR>
857 | 55-2-X<BR>
858 | -<BR>
859 | -<BR>
860 | -<BR>
861 | -<BR>
862 | -<BR>
863 | -<BR>
864 | -<BR>
865 | -<BR>
866 | -<BR>
867 | -<BR>
868 | -<BR>
869 | -<BR>
870 | 50-2-X<BR>
871 | 50-4-X<BR>
872 | 50-3-X<BR>
873 | -<BR>
874 | -<BR>
875 | -<BR>
876 | 64P<BR>
877 | 64W<BR>
878 | 64X<BR>
879 | 64Y<BR>
880 | 64Z<BR>
881 | -<BR>
882 | -<BR>
883 | -<BR>
884 | -<BR>
885 | -<BR></FONT>
886 | </TD>
887 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
888 | RT/RTR22<BR>
889 | RT/RTR22<BR>
890 | RT/RTR22<BR>
891 | RT/RTR22<BR>
892 | RJ/RJR22<BR>
893 | RJ/RJR22<BR>
894 | RJ/RJR22<BR>
895 | RT/RTR26<BR>
896 | RT/RTR26<BR>
897 | RT/RTR26<BR>
898 | RJ/RJR26<BR>
899 | RJ/RJR26<BR>
900 | RJ/RJR26<BR>
901 | RJ/RJR26<BR>
902 | RJ/RJR26<BR>
903 | RJ/RJR26<BR>
904 | RT/RTR24<BR>
905 | RT/RTR24<BR>
906 | RT/RTR24<BR>
907 | RJ/RJR24<BR>
908 | RJ/RJR24<BR>
909 | RJ/RJR24<BR>
910 | RJ/RJR24<BR>
911 | RJ/RJR24<BR>
912 | RJ/RJR24<BR>
913 | -<BR>
914 | -<BR>
915 | -<BR>
916 | -<BR>
917 | -<BR>
918 | -<BR>
919 | -<BR></FONT>
920 | </TD>
921 | </TR>
922 | <TR>
923 | <TD COLSPAN=8>
924 | </TD>
925 | </TR>
926 | <TR>
927 | <TD COLSPAN=8>
928 | <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT>
929 | </TD>
930 | </TR>
931 | <TR>
932 | <TD ALIGN=CENTER>
933 | <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT>
934 | </TD>
935 | <TD ALIGN=CENTER>
936 | <FONT SIZE=3 FACE=ARIAL><B>BI TECH</B></FONT>
937 | </TD>
938 | <TD ALIGN=CENTER>
939 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT>
940 | </TD>
941 | <TD ALIGN=CENTER>
942 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT>
943 | </TD>
944 | <TD ALIGN=CENTER>
945 | <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT>
946 | </TD>
947 | <TD ALIGN=CENTER>
948 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT>
949 | </TD>
950 | <TD ALIGN=CENTER>
951 | <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT>
952 | </TD>
953 | <TD ALIGN=CENTER>
954 | <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT>
955 | </TD>
956 | </TR>
957 | <TR>
958 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
959 | 3323P<BR>
960 | 3323S<BR>
961 | 3323W<BR>
962 | 3329H<BR>
963 | 3329P<BR>
964 | 3329W<BR>
965 | 3339H<BR>
966 | 3339P<BR>
967 | 3339W<BR>
968 | 3352E<BR>
969 | 3352H<BR>
970 | 3352K<BR>
971 | 3352P<BR>
972 | 3352T<BR>
973 | 3352V<BR>
974 | 3352W<BR>
975 | 3362H<BR>
976 | 3362M<BR>
977 | 3362P<BR>
978 | 3362R<BR>
979 | 3362S<BR>
980 | 3362U<BR>
981 | 3362W<BR>
982 | 3362X<BR>
983 | 3386B<BR>
984 | 3386C<BR>
985 | 3386F<BR>
986 | 3386H<BR>
987 | 3386K<BR>
988 | 3386M<BR>
989 | 3386P<BR>
990 | 3386S<BR>
991 | 3386W<BR>
992 | 3386X<BR></FONT>
993 | </TD>
994 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
995 | 25P<BR>
996 | 25S<BR>
997 | 25RX<BR>
998 | 82P<BR>
999 | 82M<BR>
1000 | 82PA<BR>
1001 | -<BR>
1002 | -<BR>
1003 | -<BR>
1004 | 91E<BR>
1005 | 91X<BR>
1006 | 91T<BR>
1007 | 91B<BR>
1008 | 91A<BR>
1009 | 91V<BR>
1010 | 91W<BR>
1011 | 25W<BR>
1012 | 25V<BR>
1013 | 25P<BR>
1014 | -<BR>
1015 | 25S<BR>
1016 | 25U<BR>
1017 | 25RX<BR>
1018 | 25X<BR>
1019 | 72XW<BR>
1020 | 72XL<BR>
1021 | 72PM<BR>
1022 | 72RX<BR>
1023 | -<BR>
1024 | 72PX<BR>
1025 | 72P<BR>
1026 | 72RXW<BR>
1027 | 72RXL<BR>
1028 | 72X<BR></FONT>
1029 | </TD>
1030 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1031 | -<BR>
1032 | -<BR>
1033 | -<BR>
1034 | T7YB<BR>
1035 | T7YA<BR>
1036 | -<BR>
1037 | -<BR>
1038 | -<BR>
1039 | -<BR>
1040 | -<BR>
1041 | -<BR>
1042 | -<BR>
1043 | -<BR>
1044 | -<BR>
1045 | -<BR>
1046 | -<BR>
1047 | -<BR>
1048 | TXD<BR>
1049 | TYA<BR>
1050 | TYP<BR>
1051 | -<BR>
1052 | TYD<BR>
1053 | TX<BR>
1054 | -<BR>
1055 | 150SX<BR>
1056 | 100SX<BR>
1057 | 102T<BR>
1058 | 101S<BR>
1059 | 190T<BR>
1060 | 150TX<BR>
1061 | 101<BR>
1062 | -<BR>
1063 | -<BR>
1064 | 101SX<BR></FONT>
1065 | </TD>
1066 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1067 | ET6P<BR>
1068 | ET6S<BR>
1069 | ET6X<BR>
1070 | RJ-6W/8014EMW<BR>
1071 | RJ-6P/8014EMP<BR>
1072 | RJ-6X/8014EMX<BR>
1073 | TM7W<BR>
1074 | TM7P<BR>
1075 | TM7X<BR>
1076 | -<BR>
1077 | 8017SMS<BR>
1078 | -<BR>
1079 | 8017SMB<BR>
1080 | 8017SMA<BR>
1081 | -<BR>
1082 | -<BR>
1083 | CT-6W<BR>
1084 | CT-6H<BR>
1085 | CT-6P<BR>
1086 | CT-6R<BR>
1087 | -<BR>
1088 | CT-6V<BR>
1089 | CT-6X<BR>
1090 | -<BR>
1091 | -<BR>
1092 | 8038EKV<BR>
1093 | -<BR>
1094 | 8038EKX<BR>
1095 | -<BR>
1096 | -<BR>
1097 | 8038EKP<BR>
1098 | 8038EKZ<BR>
1099 | 8038EKW<BR>
1100 | -<BR></FONT>
1101 | </TD>
1102 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1103 | -<BR>
1104 | -<BR>
1105 | -<BR>
1106 | 3321H<BR>
1107 | 3321P<BR>
1108 | 3321N<BR>
1109 | 1102H<BR>
1110 | 1102P<BR>
1111 | 1102T<BR>
1112 | RVA0911V304A<BR>
1113 | -<BR>
1114 | RVA0911H413A<BR>
1115 | RVG0707V100A<BR>
1116 | RVA0607V(H)306A<BR>
1117 | RVA1214H213A<BR>
1118 | -<BR>
1119 | -<BR>
1120 | -<BR>
1121 | -<BR>
1122 | -<BR>
1123 | -<BR>
1124 | -<BR>
1125 | -<BR>
1126 | -<BR>
1127 | 3104B<BR>
1128 | 3104C<BR>
1129 | 3104F<BR>
1130 | 3104H<BR>
1131 | -<BR>
1132 | 3104M<BR>
1133 | 3104P<BR>
1134 | 3104S<BR>
1135 | 3104W<BR>
1136 | 3104X<BR></FONT>
1137 | </TD>
1138 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1139 | EVMQ0G<BR>
1140 | EVMQIG<BR>
1141 | EVMQ3G<BR>
1142 | EVMS0G<BR>
1143 | EVMQ0G<BR>
1144 | EVMG0G<BR>
1145 | -<BR>
1146 | -<BR>
1147 | -<BR>
1148 | EVMK4GA00B<BR>
1149 | EVM30GA00B<BR>
1150 | EVMK0GA00B<BR>
1151 | EVM38GA00B<BR>
1152 | EVMB6<BR>
1153 | EVLQ0<BR>
1154 | -<BR>
1155 | EVMMSG<BR>
1156 | EVMMBG<BR>
1157 | EVMMAG<BR>
1158 | -<BR>
1159 | -<BR>
1160 | EVMMCS<BR>
1161 | -<BR>
1162 | -<BR>
1163 | -<BR>
1164 | -<BR>
1165 | -<BR>
1166 | EVMM1<BR>
1167 | -<BR>
1168 | -<BR>
1169 | EVMM0<BR>
1170 | -<BR>
1171 | -<BR>
1172 | EVMM3<BR></FONT>
1173 | </TD>
1174 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1175 | -<BR>
1176 | -<BR>
1177 | -<BR>
1178 | 62-3-1<BR>
1179 | 62-1-2<BR>
1180 | -<BR>
1181 | -<BR>
1182 | -<BR>
1183 | -<BR>
1184 | -<BR>
1185 | -<BR>
1186 | -<BR>
1187 | -<BR>
1188 | -<BR>
1189 | -<BR>
1190 | -<BR>
1191 | 67R<BR>
1192 | -<BR>
1193 | 67P<BR>
1194 | -<BR>
1195 | -<BR>
1196 | -<BR>
1197 | -<BR>
1198 | 67X<BR>
1199 | 63V<BR>
1200 | 63S<BR>
1201 | 63M<BR>
1202 | -<BR>
1203 | -<BR>
1204 | 63H<BR>
1205 | 63P<BR>
1206 | -<BR>
1207 | -<BR>
1208 | 63X<BR></FONT>
1209 | </TD>
1210 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1211 | -<BR>
1212 | -<BR>
1213 | -<BR>
1214 | RJ/RJR50<BR>
1215 | RJ/RJR50<BR>
1216 | RJ/RJR50<BR>
1217 | -<BR>
1218 | -<BR>
1219 | -<BR>
1220 | -<BR>
1221 | -<BR>
1222 | -<BR>
1223 | -<BR>
1224 | -<BR>
1225 | -<BR>
1226 | -<BR>
1227 | -<BR>
1228 | -<BR>
1229 | -<BR>
1230 | -<BR>
1231 | -<BR>
1232 | -<BR>
1233 | -<BR>
1234 | -<BR>
1235 | -<BR>
1236 | -<BR>
1237 | -<BR>
1238 | -<BR>
1239 | -<BR>
1240 | -<BR>
1241 | -<BR>
1242 | -<BR>
1243 | -<BR>
1244 | -<BR></FONT>
1245 | </TD>
1246 | </TR>
1247 | </TABLE>
1248 | <P> <P>
1249 | <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3>
1250 | <TR>
1251 | <TD COLSPAN=7>
1252 | <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT>
1253 | <P>
1254 | <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT>
1255 | </TD>
1256 | </TR>
1257 | <TR>
1258 | <TD>
1259 | <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT>
1260 | </TD>
1261 | <TD>
1262 | <FONT SIZE=3 FACE=ARIAL><B>BI TECH</B></FONT>
1263 | </TD>
1264 | <TD>
1265 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT>
1266 | </TD>
1267 | <TD>
1268 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT>
1269 | </TD>
1270 | <TD>
1271 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT>
1272 | </TD>
1273 | <TD>
1274 | <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT>
1275 | </TD>
1276 | <TD>
1277 | <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT>
1278 | </TD>
1279 | </TR>
1280 | <TR>
1281 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1282 | 3224G<BR>
1283 | 3224J<BR>
1284 | 3224W<BR>
1285 | 3269P<BR>
1286 | 3269W<BR>
1287 | 3269X<BR></FONT>
1288 | </TD>
1289 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1290 | 44G<BR>
1291 | 44J<BR>
1292 | 44W<BR>
1293 | 84P<BR>
1294 | 84W<BR>
1295 | 84X<BR></FONT>
1296 | </TD>
1297 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1298 | -<BR>
1299 | -<BR>
1300 | -<BR>
1301 | ST63Z<BR>
1302 | ST63Y<BR>
1303 | -<BR></FONT>
1304 | </TD>
1305 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1306 | -<BR>
1307 | -<BR>
1308 | -<BR>
1309 | ST5P<BR>
1310 | ST5W<BR>
1311 | ST5X<BR></FONT>
1312 | </TD>
1313 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1314 | -<BR>
1315 | -<BR>
1316 | -<BR>
1317 | -<BR>
1318 | -<BR>
1319 | -<BR></FONT>
1320 | </TD>
1321 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1322 | -<BR>
1323 | -<BR>
1324 | -<BR>
1325 | -<BR>
1326 | -<BR>
1327 | -<BR></FONT>
1328 | </TD>
1329 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1330 | -<BR>
1331 | -<BR>
1332 | -<BR>
1333 | -<BR>
1334 | -<BR>
1335 | -<BR></FONT>
1336 | </TD>
1337 | </TR>
1338 | <TR>
1339 | <TD COLSPAN=7>
1340 | </TD>
1341 | </TR>
1342 | <TR>
1343 | <TD COLSPAN=7>
1344 | <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT>
1345 | </TD>
1346 | </TR>
1347 | <TR>
1348 | <TD>
1349 | <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT>
1350 | </TD>
1351 | <TD>
1352 | <FONT SIZE=3 FACE=ARIAL><B>BI TECH</B></FONT>
1353 | </TD>
1354 | <TD>
1355 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT>
1356 | </TD>
1357 | <TD>
1358 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT>
1359 | </TD>
1360 | <TD>
1361 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT>
1362 | </TD>
1363 | <TD>
1364 | <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT>
1365 | </TD>
1366 | <TD>
1367 | <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT>
1368 | </TD>
1369 | </TR>
1370 | <TR>
1371 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1372 | 3314G<BR>
1373 | 3314J<BR>
1374 | 3364A/B<BR>
1375 | 3364C/D<BR>
1376 | 3364W/X<BR>
1377 | 3313G<BR>
1378 | 3313J<BR></FONT>
1379 | </TD>
1380 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1381 | 23B<BR>
1382 | 23A<BR>
1383 | 21X<BR>
1384 | 21W<BR>
1385 | -<BR>
1386 | 22B<BR>
1387 | 22A<BR></FONT>
1388 | </TD>
1389 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1390 | ST5YL/ST53YL<BR>
1391 | ST5YJ/5T53YJ<BR>
1392 | ST-23A<BR>
1393 | ST-22B<BR>
1394 | ST-22<BR>
1395 | -<BR>
1396 | -<BR></FONT>
1397 | </TD>
1398 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1399 | ST-4B<BR>
1400 | ST-4A<BR>
1401 | -<BR>
1402 | -<BR>
1403 | -<BR>
1404 | ST-3B<BR>
1405 | ST-3A<BR></FONT>
1406 | </TD>
1407 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1408 | -<BR>
1409 | EVM-6YS<BR>
1410 | EVM-1E<BR>
1411 | EVM-1G<BR>
1412 | EVM-1D<BR>
1413 | -<BR>
1414 | -<BR></FONT>
1415 | </TD>
1416 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1417 | G4B<BR>
1418 | G4A<BR>
1419 | TR04-3S1<BR>
1420 | TRG04-2S1<BR>
1421 | -<BR>
1422 | -<BR>
1423 | -<BR></FONT>
1424 | </TD>
1425 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3>
1426 | -<BR>
1427 | -<BR>
1428 | DVR-43A<BR>
1429 | CVR-42C<BR>
1430 | CVR-42A/C<BR>
1431 | -<BR>
1432 | -<BR></FONT>
1433 | </TD>
1434 | </TR>
1435 | </TABLE>
1436 | <P>
1437 | <FONT SIZE=4 FACE=ARIAL><B>ALT = ALTERNATE</B></FONT>
1438 | <P>
1439 |
1440 |
1441 | <P>
1442 | </td>
1443 | </tr>
1444 | </table>
1445 |
1446 |
1447 | <b>RESISTOR</b><p>
1448 | MELF 0.10 W
1449 |
1450 |
1451 |
1452 |
1453 |
1454 |
1455 |
1456 |
1457 | >NAME
1458 | >VALUE
1459 |
1460 |
1461 |
1462 |
1463 |
1464 |
1465 |
1466 | RESISTOR
1467 | MELF 0.10 W
1468 |
1469 |
1470 |
1471 |
1472 |
1473 |
1474 |
1475 | Arduino Clone pinheaders
1476 | By cl@xganon.com
1477 | http://www.xganon.com
1478 |
1479 |
1480 |
1481 |
1482 |
1483 |
1484 |
1485 |
1486 |
1487 |
1488 |
1489 |
1490 |
1491 |
1492 |
1493 |
1494 |
1495 |
1496 |
1497 |
1498 |
1499 |
1500 |
1501 |
1502 |
1503 |
1504 |
1505 |
1506 |
1507 |
1508 |
1509 |
1510 |
1511 |
1512 |
1513 |
1514 |
1515 |
1516 |
1517 |
1518 |
1519 |
1520 | <b>DIY Modules for Arduino, Raspberry Pi, CubieBoard etc.</b>
1521 | <br><br>
1522 | The library contains a list of symbols and footprints for popular, cheap and easy-to-use electronic modules.<br>
1523 | The modules are intend to work with microprocessor-based platforms such as <a href="http://arduino.cc">Arduino</a>, <a href="http://raspberrypi.org/">Raspberry Pi</a>, <a href="http://cubieboard.org/">CubieBoard</a>, <a href="http://beagleboard.org/">BeagleBone</a> and many others. There are many manufacturers of the modules in the world. Almost all of them can be bought on <a href="ebay.com">ebay.com</a>.<br>
1524 | <br>
1525 | By using this library, you can design a PCB for devices created with usage of modules. Even if you do not need to create PCB design, you can also use the library to quickly document your work by drawing schematics of devices built by you.<br>
1526 | <br>
1527 | The latest version, examples, photos and much more can be found at: <b><a href="http://diymodules.org/eagle">diymodules.org/eagle</a></b><br><br>
1528 | Comments, suggestions and bug reports please send to: <b><a href="mailto:eagle@diymodules.org">eagle@diymodules.org</b></a><br><br>
1529 | <i>Version: 1.8.0 (2017-Jul-02)</i><br>
1530 | <i>Created by: Miroslaw Brudnowski</i><br><br>
1531 | <i>Released under the Creative Commons Attribution 4.0 International License: <a href="http://creativecommons.org/licenses/by/4.0">http://creativecommons.org/licenses/by/4.0</a></i>
1532 | <br><br>
1533 | <center>
1534 | <a href="http://diymodules.org/eagle"><img src="http://www.diymodules.org/img/diymodules-lbr-image.php?v=1.8.0" alt="DIYmodules.org"></a>
1535 | </center>
1536 |
1537 |
1538 | <b>DC/DC Step-Up Regulator</b> based on <b>MT3608</b> chip
1539 |
1540 |
1541 |
1542 |
1543 |
1544 |
1545 |
1546 |
1547 | >NAME
1548 | >VALUE
1549 | IN
1550 | OUT
1551 |
1552 |
1553 |
1554 |
1555 |
1556 |
1557 |
1558 |
1559 |
1560 |
1561 | <b>Phoenix Connectors</b><p>
1562 | Grid 2.54 mm<p>
1563 | <author>Created by librarian@cadsoft.de</author>
1564 |
1565 |
1566 | <b>PHOENIX CONNECTOR</b>
1567 |
1568 |
1569 |
1570 |
1571 |
1572 |
1573 |
1574 |
1575 |
1576 |
1577 |
1578 | >NAME
1579 | >VALUE
1580 |
1581 |
1582 |
1583 |
1584 | PHOENIX CONNECTOR
1585 |
1586 |
1587 |
1588 |
1589 |
1590 |
1591 |
1592 |
1593 |
1594 |
1595 |
1596 |
1597 |
1598 |
1599 |
1600 |
1601 | <b>EAGLE Design Rules</b>
1602 | <p>
1603 | Die Standard-Design-Rules sind so gewählt, dass sie für
1604 | die meisten Anwendungen passen. Sollte ihre Platine
1605 | besondere Anforderungen haben, treffen Sie die erforderlichen
1606 | Einstellungen hier und speichern die Design Rules unter
1607 | einem neuen Namen ab.
1608 | <b>EAGLE Design Rules</b>
1609 | <p>
1610 | The default Design Rules have been set to cover
1611 | a wide range of applications. Your particular design
1612 | may have different requirements, so please make the
1613 | necessary adjustments and save your customized
1614 | design rules under a new name.
1615 |
1616 |
1617 |
1618 |
1619 |
1620 |
1621 |
1622 |
1623 |
1624 |
1625 |
1626 |
1627 |
1628 |
1629 |
1630 |
1631 |
1632 |
1633 |
1634 |
1635 |
1636 |
1637 |
1638 |
1639 |
1640 |
1641 |
1642 |
1643 |
1644 |
1645 |
1646 |
1647 |
1648 |
1649 |
1650 |
1651 |
1652 |
1653 |
1654 |
1655 |
1656 |
1657 |
1658 |
1659 |
1660 |
1661 |
1662 |
1663 |
1664 |
1665 |
1666 |
1667 |
1668 |
1669 |
1670 |
1671 |
1672 |
1673 |
1674 |
1675 |
1676 |
1677 |
1678 |
1679 |
1680 |
1681 |
1682 |
1683 |
1684 |
1685 |
1686 |
1687 |
1688 |
1689 |
1690 |
1691 |
1692 |
1693 |
1694 |
1695 |
1696 |
1697 |
1698 |
1699 |
1700 |
1701 |
1702 |
1703 |
1704 |
1705 |
1706 |
1707 |
1708 |
1709 |
1710 |
1711 |
1712 |
1713 |
1714 |
1715 |
1716 |
1717 |
1718 |
1719 |
1720 |
1721 |
1722 |
1723 |
1724 |
1725 |
1726 |
1727 |
1728 |
1729 |
1730 |
1731 |
1732 |
1733 |
1734 |
1735 |
1736 |
1737 |
1738 |
1739 |
1740 |
1741 |
1742 |
1743 |
1744 |
1745 |
1746 |
1747 |
1748 |
1749 |
1750 |
1751 |
1752 |
1753 |
1754 |
1755 |
1756 |
1757 |
1758 |
1759 |
1760 |
1761 |
1762 |
1763 |
1764 |
1765 |
1766 |
1767 |
1768 |
1769 |
1770 |
1771 |
1772 |
1773 |
1774 |
1775 |
1776 |
1777 |
1778 |
1779 |
1780 |
1781 |
1782 |
1783 |
1784 |
1785 |
1786 |
1787 |
1788 |
1789 |
1790 |
1791 |
1792 |
1793 |
1794 |
1795 |
1796 |
1797 |
1798 |
1799 |
1800 |
1801 |
1802 |
1803 |
1804 |
1805 |
1806 |
1807 |
1808 |
1809 |
1810 |
1811 |
1812 |
1813 |
1814 |
1815 |
1816 |
1817 |
1818 |
1819 |
1820 |
1821 |
1822 |
1823 |
1824 |
1825 |
1826 |
1827 |
1828 |
1829 |
1830 |
1831 |
1832 |
1833 |
1834 |
1835 |
1836 |
1837 |
1838 |
1839 |
1840 |
1841 |
1842 |
1843 |
1844 |
1845 |
1846 |
1847 |
1848 |
1849 |
1850 |
1851 |
1852 |
1853 |
1854 |
1855 |
1856 |
1857 |
1858 |
1859 |
1860 |
1861 |
1862 |
1863 |
1864 |
1865 |
1866 |
1867 |
1868 |
1869 |
1870 |
1871 |
1872 |
1873 |
1874 |
1875 |
1876 |
1877 |
1878 |
1879 |
1880 |
1881 |
1882 |
1883 |
1884 |
1885 |
1886 |
1887 |
1888 |
1889 |
1890 |
1891 |
1892 |
1893 |
1894 |
1895 |
1896 |
1897 |
1898 |
1899 |
1900 |
1901 |
1902 |
1903 |
1904 |
1905 |
1906 |
1907 |
1908 |
1909 |
1910 |
1911 |
1912 |
1913 |
1914 |
1915 |
1916 |
1917 |
1918 |
1919 |
1920 |
1921 |
1922 |
1923 |
1924 |
1925 |
1926 |
1927 |
1928 |
1929 |
1930 |
1931 |
1932 |
1933 |
1934 |
1935 |
1936 |
1937 |
1938 |
1939 |
1940 |
1941 |
1942 |
1943 |
1944 |
1945 |
1946 |
1947 |
1948 |
1949 |
1950 |
1951 |
1952 |
1953 |
1954 |
1955 |
1956 |
1957 |
1958 |
1959 |
1960 |
1961 |
1962 |
1963 |
1964 |
1965 |
1966 |
1967 |
1968 |
1969 |
1970 |
1971 |
1972 |
1973 |
1974 |
1975 |
1976 |
1977 |
1978 |
1979 |
1980 |
1981 |
1982 |
1983 |
1984 |
1985 |
1986 |
1987 |
1988 |
1989 |
1990 |
1991 |
1992 |
1993 |
1994 |
1995 |
1996 |
1997 |
1998 |
1999 |
2000 |
2001 |
2002 |
2003 |
2004 |
2005 |
2006 |
2007 |
2008 |
2009 |
2010 |
2011 |
2012 |
2013 |
2014 |
2015 |
2016 |
2017 |
2018 |
2019 |
2020 |
2021 |
2022 |
2023 |
2024 |
2025 |
2026 |
2027 |
2028 |
2029 |
2030 |
2031 |
2032 |
2033 |
2034 |
2035 |
2036 |
2037 |
2038 |
2039 |
2040 |
2041 |
2042 |
2043 |
2044 |
2045 |
2046 |
2047 |
2048 |
2049 |
2050 |
2051 |
2052 |
2053 |
2054 |
2055 |
2056 |
2057 |
2058 |
2059 |
2060 |
2061 |
2062 |
2063 |
2064 |
2065 |
2066 |
2067 |
2068 |
2069 |
2070 |
2071 |
2072 |
2073 |
2074 |
2075 |
2076 |
2077 |
2078 |
2079 |
2080 |
2081 |
2082 |
2083 |
2084 |
2085 |
2086 |
2087 |
2088 |
2089 |
2090 |
2091 |
2092 |
2093 |
2094 |
2095 |
2096 |
2097 |
2098 |
2099 |
2100 |
2101 |
2102 |
2103 |
2104 |
2105 |
2106 |
2107 |
2108 |
2109 |
2110 |
2111 |
2112 |
2113 |
2114 |
2115 |
2116 |
2117 |
2118 |
2119 |
2120 |
2121 |
2122 |
2123 |
2124 |
2125 |
2126 |
2127 |
2128 |
2129 |
2130 |
2131 |
2132 |
2133 |
2134 |
2135 |
2136 |
2137 |
2138 |
2139 |
2140 |
2141 |
2142 |
2143 |
2144 |
2145 |
2146 |
2147 |
2148 |
2149 |
2150 |
2151 |
2152 |
2153 |
2154 |
2155 |
2156 |
2157 |
2158 |
2159 |
2160 |
2161 |
2162 |
2163 |
2164 |
2165 |
2166 |
2167 |
2168 |
2169 |
2170 |
2171 |
2172 |
2173 |
2174 |
2175 |
2176 |
2177 |
2178 |
2179 |
2180 |
2181 |
2182 |
2183 |
2184 |
2185 |
2186 |
2187 |
2188 |
2189 |
2190 |
2191 |
2192 |
2193 |
2194 |
2195 |
2196 |
2197 |
2198 |
2199 |
2200 |
2201 |
2202 |
2203 |
2204 |
2205 |
2206 |
2207 |
2208 |
2209 |
2210 |
2211 |
2212 |
2213 |
2214 |
2215 |
2216 |
2217 |
2218 |
2219 |
2220 |
2221 |
2222 |
2223 |
2224 |
2225 |
2226 |
2227 |
2228 |
2229 |
2230 |
2231 |
2232 |
2233 |
2234 |
2235 |
2236 |
2237 |
2238 |
2239 |
2240 |
2241 |
2242 |
2243 |
2244 |
2245 |
2246 |
2247 |
2248 |
2249 |
2250 |
2251 |
2252 |
2253 |
2254 |
2255 |
2256 |
2257 |
2258 |
2259 |
2260 |
2261 |
2262 |
2263 |
2264 |
2265 |
2266 |
2267 |
2268 |
2269 |
2270 |
2271 |
2272 |
2273 |
2274 |
2275 |
2276 |
2277 |
2278 |
2279 |
2280 |
2281 |
2282 |
2283 |
2284 |
2285 |
2286 |
2287 |
2288 |
2289 |
2290 |
2291 |
2292 |
2293 |
2294 |
2295 |
2296 |
2297 |
2298 |
2299 |
2300 |
2301 |
2302 |
2303 |
2304 |
2305 |
2306 |
2307 |
2308 |
2309 |
2310 |
2311 |
2312 |
2313 |
2314 |
2315 |
2316 |
2317 |
2318 |
2319 |
2320 |
2321 |
2322 |
2323 |
2324 |
2325 |
2326 |
2327 |
2328 |
2329 |
2330 |
2331 |
2332 |
2333 |
2334 |
2335 |
2336 |
2337 |
2338 |
2339 |
2340 |
2341 |
2342 |
2343 |
2344 |
2345 |
2346 |
2347 |
2348 |
2349 |
2350 |
2351 |
2352 |
2353 |
2354 |
2355 |
2356 |
2357 |
2358 |
2359 |
2360 |
2361 |
2362 |
2363 |
2364 |
2365 |
2366 |
2367 |
2368 |
2369 |
2370 |
2371 |
2372 |
2373 |
2374 |
2375 |
2376 |
2377 |
2378 |
2379 |
2380 |
2381 |
2382 |
2383 |
2384 |
2385 |
2386 |
2387 |
2388 |
2389 |
2390 |
2391 |
2392 |
2393 |
2394 |
2395 |
2396 |
2397 |
2398 |
2399 |
2400 |
2401 |
2402 |
2403 |
2404 |
2405 |
2406 |
2407 |
2408 |
2409 |
2410 |
2411 |
2412 |
2413 |
2414 |
2415 |
2416 |
2417 |
2418 |
2419 |
2420 |
2421 |
2422 |
2423 |
2424 |
2425 |
2426 |
2427 |
2428 |
2429 |
2430 |
2431 |
2432 |
2433 |
2434 |
2435 |
2436 |
2437 |
2438 |
2439 |
2440 |
2441 |
2442 |
2443 |
2444 |
2445 |
2446 |
2447 |
2448 |
2449 |
2450 |
2451 |
2452 |
2453 |
2454 |
2455 |
2456 |
2457 |
2458 |
2459 |
2460 |
2461 |
2462 |
2463 |
2464 |
2465 |
2466 |
2467 |
2468 |
2469 |
2470 |
2471 |
2472 |
2473 |
2474 |
2475 |
2476 |
2477 |
2478 |
2479 |
2480 |
2481 |
2482 |
2483 |
2484 |
2485 |
2486 |
2487 |
2488 |
2489 |
2490 |
2491 |
2492 |
2493 |
2494 |
2495 |
2496 |
2497 |
2498 |
2499 |
2500 |
2501 |
2502 |
2503 |
2504 |
2505 |
2506 |
2507 |
2508 |
2509 |
2510 |
2511 |
2512 |
2513 |
2514 |
2515 |
2516 |
2517 |
2518 |
2519 |
2520 |
2521 |
2522 |
2523 |
2524 |
2525 |
2526 |
2527 |
2528 |
2529 |
2530 |
2531 |
2532 |
2533 |
2534 |
2535 |
2536 |
2537 |
2538 |
2539 |
2540 |
2541 |
2542 |
2543 |
2544 |
2545 |
2546 |
2547 |
2548 |
2549 |
2550 |
2551 |
2552 |
2553 |
2554 |
2555 |
2556 |
2557 |
2558 |
2559 |
2560 |
2561 |
2562 |
2563 |
2564 |
2565 |
2566 |
2567 |
2568 |
2569 |
2570 |
2571 |
2572 |
2573 |
2574 |
2575 |
2576 |
2577 |
2578 |
2579 |
2580 |
2581 |
2582 |
2583 |
2584 |
2585 |
2586 |
2587 |
2588 |
2589 |
2590 |
2591 |
2592 |
2593 |
2594 |
2595 |
2596 |
2597 |
2598 |
2599 |
2600 |
2601 |
2602 |
2603 |
2604 |
2605 |
2606 |
2607 |
2608 |
2609 |
2610 |
2611 |
2612 |
2613 |
2614 |
2615 |
2616 |
2617 |
2618 |
2619 |
2620 |
2621 |
2622 |
2623 |
2624 |
2625 |
2626 |
2627 |
2628 |
2629 |
2630 |
2631 |
2632 |
2633 |
2634 |
2635 |
2636 |
2637 |
2638 |
2639 |
2640 |
2641 |
2642 |
2643 |
2644 |
2645 |
2646 |
2647 |
2648 |
2649 |
2650 |
2651 |
2652 |
2653 |
2654 |
2655 |
2656 |
2657 |
2658 |
2659 |
2660 |
2661 |
2662 |
2663 |
2664 |
2665 |
2666 |
2667 |
2668 |
2669 |
2670 |
2671 |
2672 |
2673 |
2674 |
2675 |
2676 |
2677 |
2678 |
2679 |
2680 |
2681 | Since Version 8.2, EAGLE supports online libraries. The ids
2682 | of those online libraries will not be understood (or retained)
2683 | with this version.
2684 |
2685 |
2686 | Since Version 8.3, EAGLE supports URNs for individual library
2687 | assets (packages, symbols, and devices). The URNs of those assets
2688 | will not be understood (or retained) with this version.
2689 |
2690 |
2691 | Since Version 8.3, EAGLE supports the association of 3D packages
2692 | with devices in libraries, schematics, and board files. Those 3D
2693 | packages will not be understood (or retained) with this version.
2694 |
2695 |
2696 |
2697 |
--------------------------------------------------------------------------------
/gui/arduino.cpp:
--------------------------------------------------------------------------------
1 | #include "arduino.h"
2 |
3 | #include
4 |
5 | arduino::arduino(QSerialPort *port)
6 | {
7 | serialPort = port;
8 | }
9 |
10 |
11 | void arduino::send(const QByteArray &data)
12 | {
13 | serialPort->write(data);
14 | }
15 |
16 | void arduino::recieve()
17 | {
18 | while (!serialPort->atEnd()) {
19 | buffer.append(serialPort->read(100));
20 | emit blockComplete(buffer.length());
21 | //qDebug() << "readed data: " << buffer.length();
22 | }
23 | if (buffer.length() >= bufSize)
24 | emit readComplete(buffer);
25 | }
26 |
27 | void arduino::selectChip(chip type)
28 | {
29 | switch(type){
30 | case NONE:
31 | bufSize = 0;
32 | break;
33 | case C16:
34 | bufSize = 0x07ff + 1;
35 | send("a");
36 | break;
37 | case C32:
38 | bufSize = 0x0fff + 1;
39 | send("b");
40 | break;
41 | case C64:
42 | bufSize = 0x1fff + 1;
43 | send("c");
44 | break;
45 | case C128:
46 | bufSize = 0x3fff + 1;
47 | send("d");
48 | break;
49 | case C256:
50 | bufSize = 0x7fff + 1;
51 | send("e");
52 | break;
53 | case C512:
54 | bufSize = 0xffff + 1;
55 | send("f");
56 | break;
57 | }
58 | emit chipUpdated(bufSize);
59 |
60 | }
61 |
62 | uint32_t arduino::getChipSize()
63 | {
64 | return bufSize;
65 | }
66 |
67 | void arduino::readChip()
68 | {
69 | buffer.clear();
70 | serialDataConnection = QObject::connect(serialPort, SIGNAL(readyRead()), this, SLOT(recieve()));
71 | send("r");
72 | /*
73 | static uint32_t count = 0;
74 | const QByteArray data = serialPort->readAll();
75 | if (data.count()){
76 | memcpy(&(bufWork.data())[count], data.data(), data.count());
77 | count += data.count();
78 | }
79 | ui->progressBar->setValue(count);
80 | if (count >= bufSize){
81 | ui->progressBar->setValue(bufSize);
82 | QObject::disconnect(serialDataConnection);
83 | updateButtons(true, true);
84 |
85 | log(QString("Readed %1 bytes.").arg(count));
86 | count = 0;
87 |
88 | emit readComplete(data);
89 | //emit bufferUpdated();
90 | }
91 | */
92 | }
93 |
94 | void arduino::writeChip(QByteArray data)
95 | {
96 | QByteArray ack;
97 | QByteArray buf;
98 | buf.clear();
99 |
100 | // +1 нужен для записи последнего блока
101 | for (uint32_t i = 0; i <= bufSize; i++){
102 | buf.append(data[i]);
103 | if (i && ((i & 0xf) == 0)){
104 | // 16 bytes block
105 | send(buf);
106 | buf.clear();
107 | ack = serialPort->readAll();
108 | ack.clear();
109 |
110 | if (bufSize == 2048){
111 | // Correct time to 27C16
112 | while (serialPort->waitForReadyRead(320)){
113 | ack.append(serialPort->readAll());
114 | }
115 | } else {
116 | while (serialPort->waitForReadyRead(20)){
117 | ack.append(serialPort->readAll());
118 | }
119 | }
120 | if (ack.indexOf("Complete block ") == -1){
121 | uint16_t address = 0;
122 | uint8_t value = 0xff;
123 | emit writeError(address, value);
124 | return;
125 | }
126 | }
127 | }
128 | emit writeComplete();
129 | }
130 |
131 | void arduino::voltageMesurment(bool enable)
132 | {
133 | if (enable) {
134 | send("v");
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/gui/arduino.h:
--------------------------------------------------------------------------------
1 | #ifndef ARDUINO_H
2 | #define ARDUINO_H
3 |
4 | #include
5 | #include
6 |
7 | class arduino : public QObject
8 | {
9 | Q_OBJECT
10 |
11 | private:
12 | uint32_t bufSize;
13 | QByteArray buffer;
14 | QSerialPort *serialPort = NULL;
15 | QMetaObject::Connection serialDataConnection;
16 |
17 |
18 | void send(const QByteArray &data);
19 |
20 | private slots:
21 | void recieve();
22 |
23 | public:
24 | enum chip {
25 | NONE,
26 | C16,
27 | C32,
28 | C64,
29 | C128,
30 | C256,
31 | C512
32 | };
33 |
34 | explicit arduino(QSerialPort *port);
35 | uint32_t getChipSize();
36 | void selectChip(chip type);
37 | void readChip();
38 | void writeChip(QByteArray data);
39 | void voltageMesurment(bool enable);
40 |
41 |
42 | signals:
43 | void chipUpdated(uint32_t size);
44 | void blockComplete(uint32_t address);
45 | void readComplete(QByteArray data);
46 | void readError(uint16_t address, uint8_t value);
47 | void writeComplete();
48 | void writeError(uint16_t address, uint8_t value);
49 | void voltage(float v);
50 |
51 | };
52 |
53 | #endif // ARDUINO_H
54 |
--------------------------------------------------------------------------------
/gui/gui.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2018-12-23T23:26:54
4 | #
5 | #-------------------------------------------------
6 |
7 | QT += core gui
8 | QT += serialport
9 |
10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
11 |
12 | TARGET = 27_programmer
13 | TEMPLATE = app
14 |
15 | # The following define makes your compiler emit warnings if you use
16 | # any feature of Qt which has been marked as deprecated (the exact warnings
17 | # depend on your compiler). Please consult the documentation of the
18 | # deprecated API in order to know how to port your code away from it.
19 | DEFINES += QT_DEPRECATED_WARNINGS
20 |
21 | # You can also make your code fail to compile if you use deprecated APIs.
22 | # In order to do so, uncomment the following line.
23 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
24 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
25 |
26 |
27 | SOURCES += \
28 | main.cpp \
29 | mainwindow.cpp \
30 | arduino.cpp
31 |
32 | HEADERS += \
33 | mainwindow.h \
34 | arduino.h
35 |
36 | FORMS += \
37 | mainwindow.ui
38 |
39 | # Icon for Windows
40 | win32:RC_FILE = icon.rc
41 |
42 | DISTFILES += \
43 | icon.rc
44 |
--------------------------------------------------------------------------------
/gui/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walhi/arduino_eprom27_programmer/4827cdb8050e28d8f6447954ab3dca9d55d7a274/gui/icon.ico
--------------------------------------------------------------------------------
/gui/icon.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "icon.ico"
2 |
--------------------------------------------------------------------------------
/gui/main.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | MainWindow w;
8 | w.show();
9 |
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/gui/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include "ui_mainwindow.h"
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #define NO_ERR 0
11 | #define WRITABLE 1
12 | #define NOT_WRITABLE 2
13 |
14 | MainWindow::MainWindow(QWidget *parent) :
15 | QMainWindow(parent),
16 | ui(new Ui::MainWindow),
17 | serialPort(new QSerialPort)
18 | {
19 | ui->setupUi(this);
20 |
21 | //QObject::connect(this, SIGNAL(bufferUpdated()), this, SLOT(updateButtons()));
22 |
23 | updatePortsConnection = QObject::connect(&updatePortsTimer, SIGNAL(timeout()), this, SLOT(reload_ports()));
24 | updatePortsTimer.setInterval(1000);
25 | updatePortsTimer.start();
26 | reload_ports();
27 |
28 | this->setFixedSize(QSize(371, 431));
29 | }
30 |
31 | MainWindow::~MainWindow()
32 | {
33 | delete ui;
34 | }
35 |
36 | void MainWindow::log(QString str)
37 | {
38 | ui->textBrowser->append(str);
39 | ui->textBrowser->moveCursor(QTextCursor::End);
40 | }
41 |
42 | void MainWindow::chipSelectSetEnabled (bool state)
43 | {
44 | ui->c16Button->setEnabled(state);
45 | ui->c32Button->setEnabled(state);
46 | ui->c64Button->setEnabled(state);
47 | ui->c128Button->setEnabled(state);
48 | ui->c256Button->setEnabled(state);
49 | ui->c512Button->setEnabled(state);
50 |
51 | // Clear radio buttons for correct work after reconnect
52 | ui->c16Button->setAutoExclusive(state);
53 | ui->c32Button->setAutoExclusive(state);
54 | ui->c64Button->setAutoExclusive(state);
55 | ui->c128Button->setAutoExclusive(state);
56 | ui->c256Button->setAutoExclusive(state);
57 | ui->c512Button->setAutoExclusive(state);
58 | if (!state){
59 | ui->c16Button->setChecked(false);
60 | ui->c32Button->setChecked(false);
61 | ui->c64Button->setChecked(false);
62 | ui->c128Button->setChecked(false);
63 | ui->c256Button->setChecked(false);
64 | ui->c512Button->setChecked(false);
65 | }
66 | }
67 |
68 | void MainWindow::on_connectButton_clicked()
69 | {
70 | QListWidgetItem* item = ui->portList->currentItem();
71 | if (item == NULL) {
72 | QMessageBox::critical(this, tr("EPROM Programmer"), tr("Select serial port!"));
73 | return;
74 | }
75 | if (!(item->flags() & Qt::ItemIsSelectable)) {
76 | QMessageBox::critical(this, tr("EPROM Programmer"), tr("Port is busy!"));
77 | return;
78 | }
79 | log(QString("Connect to %1").arg(item->data(Qt::UserRole).toString()));
80 | openSerialPort(item->data(Qt::UserRole).toString());
81 | }
82 |
83 | void MainWindow::openSerialPort(QString path)
84 | {
85 | serialPort->setPortName(path);
86 | serialPort->setBaudRate(QSerialPort::Baud115200);
87 | if (serialPort->open(QIODevice::ReadWrite)) {
88 | QByteArray readData = serialPort->readAll();
89 | while (serialPort->waitForReadyRead(5000)){
90 | readData.append(serialPort->readAll());
91 | if (readData.indexOf("Arduino 27 Series programmer", 0) != -1){
92 | log(QString("Connect successful"));
93 | mArduino = new arduino(serialPort);
94 | mArduino->selectChip(arduino::C256);
95 | //mArduino->readChip();
96 | chipSelected = true;
97 | //QObject::connect(serialPort, SIGNAL(errorOccurred()), this, SLOT(closeSerialPort()));
98 | QObject::connect(mArduino, SIGNAL(chipUpdated(uint32_t)), this, SLOT(resizeBuffers()));
99 |
100 | chipSelectSetEnabled(true);
101 | ui->updateButton->setEnabled(false);
102 | ui->disconnectButton->setEnabled(true);
103 | ui->connectButton->setEnabled(false);
104 | ui->voltageChipButton->setEnabled(true);
105 |
106 | updateButtons(true, false);
107 | return;
108 | }
109 | }
110 | log(QString("Arduino programmer not found."));
111 | closeSerialPort();
112 | } else {
113 | QMessageBox::critical(this, tr("Error"), serialPort->errorString());
114 | }
115 | }
116 |
117 |
118 | void MainWindow::on_disconnectButton_clicked()
119 | {
120 | closeSerialPort();
121 | }
122 |
123 | void MainWindow::closeSerialPort()
124 | {
125 | chipSelected = false;
126 | bufferClear = true;
127 |
128 | ui->disconnectButton->setEnabled(false);
129 |
130 | ui->updateButton->setEnabled(false);
131 | ui->connectButton->setEnabled(false);
132 | updatePortsTimer.start();
133 |
134 | updateButtons(false, false);
135 | chipSelectSetEnabled(false);
136 |
137 | ui->showButton->setChecked(false);
138 |
139 | if (serialPort->isOpen()){
140 | serialPort->close();
141 | log(QString("Disconnect..."));
142 | QObject::disconnect(serialDataConnection);
143 | }
144 | }
145 |
146 |
147 | void MainWindow::on_updateButton_clicked()
148 | {
149 | ui->updateButton->setEnabled(false);
150 | ui->connectButton->setEnabled(false);
151 | reload_ports();
152 | updatePortsTimer.start();
153 | }
154 |
155 | void MainWindow::on_portList_itemClicked(QListWidgetItem *item)
156 | {
157 | (void)item;
158 | ui->connectButton->setEnabled(true);
159 | ui->updateButton->setEnabled(true);
160 | updatePortsTimer.stop();
161 | }
162 |
163 | void MainWindow::reload_ports()
164 | {
165 | ui->portList->clear();
166 | const auto infos = QSerialPortInfo::availablePorts();
167 | for (const QSerialPortInfo &info : infos) {
168 | QListWidgetItem *item = new QListWidgetItem(info.portName(), ui->portList);
169 | item->setData(Qt::UserRole, info.systemLocation());
170 | if (info.isBusy()){
171 | item->setText(info.portName() + " (Busy)");
172 | item->setFlags(item->flags() & ~Qt::ItemIsSelectable);
173 | }
174 | }
175 | }
176 |
177 |
178 | void MainWindow::updateButtons(bool actions, bool buffer)
179 | {
180 | if (actions){
181 | ui->writeChipButton->setEnabled(!bufferClear);
182 | ui->verifyChipButton->setEnabled(!bufferClear);
183 | ui->readChipButton->setEnabled(chipSelected);
184 | } else {
185 | ui->writeChipButton->setEnabled(false);
186 | ui->verifyChipButton->setEnabled(false);
187 | ui->readChipButton->setEnabled(false);
188 | }
189 | ui->voltageChipButton->setEnabled(actions || updateVoltageConnection);
190 |
191 | if (buffer){
192 | ui->saveFileButton->setEnabled(!bufferClear);
193 | ui->showButton->setEnabled(!bufferClear);
194 | } else {
195 | ui->saveFileButton->setEnabled(false);
196 | ui->showButton->setEnabled(false);
197 | }
198 | ui->openFileButton->setEnabled(buffer);
199 | }
200 |
201 |
202 | void MainWindow::on_writeChipButton_clicked()
203 | {
204 | mArduino->writeChip(bufWork);
205 | }
206 |
207 | void MainWindow::on_readChipButton_clicked()
208 | {
209 | updateButtons(false, false);
210 | ui->progressBar->setMaximum(mArduino->getChipSize());
211 | log(QString("Reading %1 bytes from chip...").arg(mArduino->getChipSize()));
212 | mArduino->readChip();
213 | progressBarConnection = QObject::connect(mArduino, SIGNAL(blockComplete(uint32_t)), this, SLOT(chipOperationProgressBar(uint32_t)));
214 | checkClearConnection = QObject::connect(mArduino, SIGNAL(readComplete(QByteArray)), this, SLOT(checkClear()));
215 | }
216 |
217 | void MainWindow::checkClear()
218 | {
219 | uint32_t count;
220 |
221 | QObject::disconnect(checkClearConnection);
222 | for (count = 0; count < bufSize; count++){
223 | if (bufWork[count] != (char)0xff){
224 | log(QString("Chip not clear. Check before write."));
225 | break;
226 | }
227 | }
228 | if (count >= bufSize)
229 | log(QString("Chip clear."));
230 | }
231 |
232 |
233 | void MainWindow::on_openFileButton_clicked()
234 | {
235 | QString fileName = QFileDialog::getOpenFileName(this,
236 | tr("Open binary to buffer"), "",
237 | tr("Binary (*.bin);;All Files (*)"));
238 |
239 | if (fileName.isEmpty())
240 | return;
241 | else {
242 | QFile file(fileName);
243 | if (!file.open(QIODevice::ReadOnly)) {
244 | QMessageBox::information(this, tr("Unable to open file"),
245 | file.errorString());
246 | return;
247 | }
248 | bufWork.clear();
249 | bufCheck.fill(0);
250 | bufWork.append(file.readAll());
251 | log(QString("Load from %1 file").arg(fileName));
252 | log(QString("Readed %1 bytes").arg(bufWork.count()));
253 | if ((uint32_t)bufWork.count() < bufSize) {
254 | bufWork.append((bufSize - bufWork.count()), 0xff);
255 | }
256 | if ((uint32_t)bufWork.count() < bufSize) {
257 | log(QString("Deleated %1 bytes").arg(bufWork.count() - bufSize));
258 | bufWork.resize(bufSize);
259 | }
260 | bufferClear = false;
261 |
262 | updateButtons(true, true);
263 |
264 | emit bufferUpdated();
265 | }
266 |
267 | }
268 |
269 | void MainWindow::on_saveFileButton_clicked()
270 | {
271 | QString fileName = QFileDialog::getSaveFileName(this,
272 | tr("Save buffer"), "",
273 | tr("Binary (*.bin);;All Files (*)"));
274 |
275 | if (fileName.isEmpty())
276 | return;
277 | else {
278 | if (fileName.right(4).indexOf(".bin", 0) == -1){
279 | fileName.append(QString(".bin"));
280 | }
281 | QFile file(fileName);
282 | if (!file.open(QIODevice::WriteOnly)) {
283 | QMessageBox::information(this, tr("Unable to open file"),
284 | file.errorString());
285 | return;
286 | }
287 | file.write(bufWork);
288 | file.close();
289 | log(QString("Buffer saved to %1 file").arg(fileName));
290 | }
291 | }
292 |
293 |
294 | void MainWindow::verifyData()
295 | {
296 | QObject::disconnect(verifyDataConnection);
297 | uint32_t errors_count = 0;
298 | uint32_t warnings_count = 0;
299 | for (uint32_t i = 0; i < bufSize; i++){
300 | // if ((old xor new) and new) err
301 | if ((bufWork[i] ^ bufCheck[i]) & bufCheck[i]){
302 | errors_count++;
303 | bufWork[i] = bufCheck[i];
304 | // mark error byte
305 | bufCheck[i] = NOT_WRITABLE;
306 | } else if (bufWork[i] != bufCheck[i]){
307 | warnings_count++;
308 | bufWork[i] = bufCheck[i];
309 | bufCheck[i] = WRITABLE;
310 | } else {
311 | bufCheck[i] = NO_ERR;
312 | }
313 | }
314 | if (errors_count || warnings_count){
315 | log(QString("Verification failed."));
316 | log(QString("Errors: %1.").arg(errors_count));
317 | log(QString("Warnings: %1.").arg(warnings_count));
318 | } else {
319 | log(QString("Verification successful."));
320 | }
321 | emit bufferUpdated();
322 | }
323 |
324 |
325 | void MainWindow::on_showButton_toggled(bool checked)
326 | {
327 | if (checked){
328 | this->setFixedSize(QSize(791, 431));
329 | updateBufConnection = QObject::connect(this, SIGNAL(bufferUpdated()), this, SLOT(showBuf()));
330 | emit bufferUpdated();
331 | } else {
332 | this->setFixedSize(QSize(371, 431));
333 | QObject::disconnect(updateBufConnection);
334 | }
335 | }
336 |
337 | void MainWindow::showBuf()
338 | {
339 | QTableWidget *tableWidget = ui->tableWidget;
340 | QTableWidgetItem *newItem;
341 |
342 | // clear table
343 | tableWidget->setRowCount(0);
344 |
345 | tableWidget->setRowCount((bufSize + 1) / 8);
346 | for(int row=0; row!=tableWidget->rowCount(); ++row){
347 | newItem = new QTableWidgetItem(tr("0x%1").arg(QString::asprintf("%04X", (row * 8))));
348 | tableWidget->setVerticalHeaderItem(row, newItem);
349 | for(int column=0; column!=tableWidget->columnCount(); ++column) {
350 | newItem = new QTableWidgetItem(QString::asprintf("%02X", (uint8_t)bufWork.data()[row * 8 + column]));
351 | if (bufCheck.data()[row * 8 + column] == NOT_WRITABLE) newItem->setForeground(QColor::fromRgb(255,0,0));
352 | if (bufCheck.data()[row * 8 + column] == WRITABLE) newItem->setForeground(QColor::fromRgb(255,127,0));
353 | tableWidget->setItem(row, column, newItem);
354 | }
355 | }
356 | }
357 |
358 | void MainWindow::resizeBuffers(uint32_t size)
359 | {
360 | chipSelected = true;
361 |
362 | ui->openFileButton->setEnabled(true);
363 | ui->readChipButton->setEnabled(true);
364 |
365 | bufWork.resize(bufSize);
366 | bufCheck.resize(bufSize);
367 | bufCheck.fill(0);
368 |
369 | emit bufferUpdated();
370 | }
371 |
372 |
373 | void MainWindow::on_verifyChipButton_clicked()
374 | {
375 | // Backup work buffer
376 | bufCheck = bufWork;
377 | mArduino->readChip();
378 | verifyDataConnection = QObject::connect(mArduino, SIGNAL(readComplete()), this, SLOT(verifyData()));
379 | }
380 |
381 |
382 | void MainWindow::on_c16Button_clicked()
383 | {
384 | log("Select 27C16 chip");
385 | mArduino->selectChip(arduino::C16);
386 | }
387 |
388 | void MainWindow::on_c32Button_clicked()
389 | {
390 | log("Select 27C32 chip");
391 | mArduino->selectChip(arduino::C32);
392 | }
393 |
394 | void MainWindow::on_c64Button_clicked()
395 | {
396 | log("Select 27C64 chip");
397 | mArduino->selectChip(arduino::C64);
398 | }
399 |
400 | void MainWindow::on_c128Button_clicked()
401 | {
402 | log("Select 27C128 chip");
403 | mArduino->selectChip(arduino::C128);
404 | }
405 |
406 | void MainWindow::on_c256Button_clicked()
407 | {
408 | log("Select 27C256 chip");
409 | mArduino->selectChip(arduino::C256);
410 | }
411 |
412 | void MainWindow::on_c512Button_clicked()
413 | {
414 | log("Select 27C512 chip");
415 | mArduino->selectChip(arduino::C512);
416 | }
417 |
418 |
419 | void MainWindow::showVoltage()
420 | {
421 | //writeData("v");
422 | QByteArray readData = serialPort->readAll();
423 | QString str = "Programming voltage: ";
424 | int8_t pos;
425 | while (serialPort->waitForReadyRead(80)){
426 | readData.append(serialPort->readAll());
427 | if ((pos = readData.indexOf(str, 0)) != -1){
428 | readData.remove(pos, str.length());
429 | ui->progressBar->setValue((QString(readData).simplified().toFloat() * 10));
430 | }
431 | }
432 | }
433 |
434 | void MainWindow::on_voltageChipButton_toggled(bool checked)
435 | {
436 | if (checked){
437 | updateVoltageConnection = QObject::connect(&updateVoltageTimer, SIGNAL(timeout()), this, SLOT(showVoltage()));
438 | updateVoltageTimer.setInterval(300);
439 | updateVoltageTimer.start();
440 |
441 | // Change progressBar params
442 | ui->progressBar->setMinimum(50);
443 | ui->progressBar->setMaximum(300);
444 | ui->progressBar->setFormat("%v");
445 | ui->progressBar->setTextVisible(true);
446 |
447 | showVoltage();
448 | updateButtons(false, false);
449 | } else {
450 | QObject::disconnect(updateVoltageConnection);
451 | updateVoltageTimer.stop();
452 | ui->progressBar->setMinimum(0);
453 | ui->progressBar->setMaximum(100);
454 | ui->progressBar->setFormat("%p%");
455 | ui->progressBar->setValue(0);
456 | updateButtons(true, chipSelected);
457 | }
458 | }
459 |
460 | void MainWindow::chipOperationProgressBar(uint32_t value)
461 | {
462 | ui->progressBar->setValue(value);
463 | }
464 |
465 | void MainWindow::on_progressBar_valueChanged(int value)
466 | {
467 | if (updateVoltageConnection){
468 | double i = value/10.0;
469 | QString text;
470 | text.sprintf("%02.1f", i);
471 | ui->progressBar->setFormat(text + QString(" V"));
472 | }
473 | }
474 |
--------------------------------------------------------------------------------
/gui/mainwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef MAINWINDOW_H
2 | #define MAINWINDOW_H
3 |
4 | #include "arduino.h"
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | namespace Ui {
12 | class MainWindow;
13 | }
14 |
15 | class MainWindow : public QMainWindow
16 | {
17 | Q_OBJECT
18 |
19 | public:
20 | explicit MainWindow(QWidget *parent = 0);
21 | ~MainWindow();
22 | signals:
23 |
24 | void chipReaded();
25 |
26 | void bufferUpdated();
27 |
28 | void chipUpdated();
29 |
30 | private slots:
31 | void showBuf();
32 |
33 | void on_openFileButton_clicked();
34 |
35 | void on_saveFileButton_clicked();
36 |
37 | void on_readChipButton_clicked();
38 |
39 | void checkClear();
40 |
41 | void on_writeChipButton_clicked();
42 |
43 | void on_verifyChipButton_clicked();
44 |
45 | void verifyData();
46 |
47 | void on_c16Button_clicked();
48 |
49 | void on_c32Button_clicked();
50 |
51 | void on_c64Button_clicked();
52 |
53 | void on_c128Button_clicked();
54 |
55 | void on_c256Button_clicked();
56 |
57 | void on_c512Button_clicked();
58 |
59 | void resizeBuffers(uint32_t size);
60 |
61 | void on_connectButton_clicked();
62 |
63 | void on_disconnectButton_clicked();
64 |
65 | void on_updateButton_clicked();
66 |
67 | void on_showButton_toggled(bool checked);
68 |
69 | void updateButtons(bool actions, bool buffer);
70 |
71 | void reload_ports();
72 |
73 | void on_portList_itemClicked(QListWidgetItem *item);
74 |
75 | void on_voltageChipButton_toggled(bool checked);
76 |
77 | void showVoltage();
78 |
79 | void on_progressBar_valueChanged(int value);
80 |
81 | void chipOperationProgressBar(uint32_t value);
82 |
83 | private:
84 | Ui::MainWindow *ui;
85 | QSerialPort *serialPort = NULL;
86 | arduino *mArduino = NULL;
87 |
88 | QTimer updatePortsTimer;
89 | QTimer updateVoltageTimer;
90 | QMetaObject::Connection updatePortsConnection;
91 |
92 | QMetaObject::Connection progressBarConnection;
93 | QMetaObject::Connection serialDataConnection;
94 | QMetaObject::Connection verifyDataConnection;
95 | QMetaObject::Connection checkClearConnection;
96 | QMetaObject::Connection updateBufConnection;
97 | QMetaObject::Connection updateVoltageConnection;
98 |
99 | bool chipSelected = false;
100 | bool bufferClear = true;
101 | uint32_t bufSize = 0;
102 |
103 | QByteArray bufWork;
104 | QByteArray bufCheck;
105 |
106 | void log(QString str);
107 |
108 | void openSerialPort(QString path);
109 |
110 | void closeSerialPort();
111 |
112 | void chipSelectSetEnabled (bool state);
113 | };
114 |
115 | #endif // MAINWINDOW_H
116 |
--------------------------------------------------------------------------------
/gui/mainwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | MainWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 791
10 | 431
11 |
12 |
13 |
14 |
15 | 0
16 | 0
17 |
18 |
19 |
20 |
21 | 16777215
22 | 16777215
23 |
24 |
25 |
26 | Qt::NoContextMenu
27 |
28 |
29 | EPROM Programmer
30 |
31 |
32 | false
33 |
34 |
35 |
36 |
37 |
38 | 230
39 | 10
40 | 131
41 | 161
42 |
43 |
44 |
45 | Chip type
46 |
47 |
48 | false
49 |
50 |
51 | false
52 |
53 |
54 |
55 | false
56 |
57 |
58 |
59 | 10
60 | 30
61 | 81
62 | 22
63 |
64 |
65 |
66 | 27C16
67 |
68 |
69 | true
70 |
71 |
72 |
73 |
74 | false
75 |
76 |
77 |
78 | 10
79 | 70
80 | 81
81 | 22
82 |
83 |
84 |
85 | 27C64
86 |
87 |
88 |
89 |
90 | false
91 |
92 |
93 |
94 | 10
95 | 90
96 | 81
97 | 22
98 |
99 |
100 |
101 | 27C128
102 |
103 |
104 |
105 |
106 | false
107 |
108 |
109 |
110 | 10
111 | 110
112 | 81
113 | 22
114 |
115 |
116 |
117 | 27C256
118 |
119 |
120 |
121 |
122 | false
123 |
124 |
125 |
126 | 10
127 | 130
128 | 81
129 | 22
130 |
131 |
132 |
133 | 27C512
134 |
135 |
136 |
137 |
138 | false
139 |
140 |
141 |
142 | 10
143 | 50
144 | 81
145 | 22
146 |
147 |
148 |
149 | 27C32
150 |
151 |
152 |
153 |
154 |
155 | false
156 |
157 |
158 |
159 | 10
160 | 180
161 | 111
162 | 27
163 |
164 |
165 |
166 | Open file
167 |
168 |
169 |
170 |
171 | false
172 |
173 |
174 |
175 | 130
176 | 180
177 | 111
178 | 27
179 |
180 |
181 |
182 | Save file
183 |
184 |
185 |
186 |
187 | false
188 |
189 |
190 |
191 | 100
192 | 210
193 | 81
194 | 27
195 |
196 |
197 |
198 | Read
199 |
200 |
201 | false
202 |
203 |
204 |
205 |
206 | false
207 |
208 |
209 |
210 | 190
211 | 210
212 | 81
213 | 27
214 |
215 |
216 |
217 | Write
218 |
219 |
220 |
221 |
222 | false
223 |
224 |
225 |
226 | 280
227 | 210
228 | 81
229 | 27
230 |
231 |
232 |
233 | Verify
234 |
235 |
236 |
237 |
238 |
239 | 10
240 | 270
241 | 351
242 | 151
243 |
244 |
245 |
246 |
247 | Monospace
248 |
249 |
250 |
251 |
252 |
253 | true
254 |
255 |
256 |
257 | 10
258 | 240
259 | 351
260 | 23
261 |
262 |
263 |
264 | 0
265 |
266 |
267 | true
268 |
269 |
270 |
271 |
272 |
273 | 10
274 | 10
275 | 211
276 | 161
277 |
278 |
279 |
280 | Serial port
281 |
282 |
283 |
284 |
285 | 10
286 | 30
287 | 81
288 | 121
289 |
290 |
291 |
292 | QFrame::NoFrame
293 |
294 |
295 | QFrame::Plain
296 |
297 |
298 |
299 |
300 | false
301 |
302 |
303 |
304 | 100
305 | 30
306 | 101
307 | 27
308 |
309 |
310 |
311 | Connect
312 |
313 |
314 |
315 |
316 | false
317 |
318 |
319 |
320 | 100
321 | 60
322 | 101
323 | 27
324 |
325 |
326 |
327 | Disconnect
328 |
329 |
330 |
331 |
332 | false
333 |
334 |
335 |
336 | 100
337 | 90
338 | 101
339 | 27
340 |
341 |
342 |
343 | Update list
344 |
345 |
346 |
347 |
348 |
349 | false
350 |
351 |
352 |
353 | 10
354 | 210
355 | 81
356 | 27
357 |
358 |
359 |
360 | Voltage
361 |
362 |
363 | true
364 |
365 |
366 |
367 |
368 |
369 | 380
370 | 10
371 | 401
372 | 411
373 |
374 |
375 |
376 |
377 | Monospace
378 | 11
379 | 50
380 | false
381 |
382 |
383 |
384 | Qt::ScrollBarAlwaysOn
385 |
386 |
387 | Qt::ScrollBarAlwaysOff
388 |
389 |
390 | QAbstractScrollArea::AdjustToContents
391 |
392 |
393 | QAbstractItemView::NoEditTriggers
394 |
395 |
396 | false
397 |
398 |
399 | false
400 |
401 |
402 | false
403 |
404 |
405 | false
406 |
407 |
408 | QAbstractItemView::ExtendedSelection
409 |
410 |
411 | false
412 |
413 |
414 | 1
415 |
416 |
417 | 8
418 |
419 |
420 | false
421 |
422 |
423 | 40
424 |
425 |
426 | false
427 |
428 |
429 |
430 | 0xffff
431 |
432 |
433 |
434 |
435 | 0
436 |
437 |
438 |
439 |
440 | 1
441 |
442 |
443 |
444 |
445 | 2
446 |
447 |
448 |
449 |
450 | 3
451 |
452 |
453 |
454 |
455 | 4
456 |
457 |
458 |
459 |
460 | 5
461 |
462 |
463 |
464 |
465 | 6
466 |
467 |
468 |
469 |
470 | 7
471 |
472 |
473 | -
474 |
475 | 00
476 |
477 |
478 | -
479 |
480 | 01
481 |
482 |
483 | -
484 |
485 | 02
486 |
487 |
488 | -
489 |
490 | 04
491 |
492 |
493 | -
494 |
495 | 08
496 |
497 |
498 | -
499 |
500 | 10
501 |
502 |
503 | -
504 |
505 | aa
506 |
507 |
508 | -
509 |
510 | cc
511 |
512 |
513 |
514 |
515 |
516 | false
517 |
518 |
519 |
520 | 250
521 | 180
522 | 111
523 | 27
524 |
525 |
526 |
527 | Show buffer
528 |
529 |
530 | true
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
--------------------------------------------------------------------------------
/imgs/sch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walhi/arduino_eprom27_programmer/4827cdb8050e28d8f6447954ab3dca9d55d7a274/imgs/sch.png
--------------------------------------------------------------------------------
/imgs/ubuntu_mate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walhi/arduino_eprom27_programmer/4827cdb8050e28d8f6447954ab3dca9d55d7a274/imgs/ubuntu_mate.png
--------------------------------------------------------------------------------
/imgs/win.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walhi/arduino_eprom27_programmer/4827cdb8050e28d8f6447954ab3dca9d55d7a274/imgs/win.png
--------------------------------------------------------------------------------
/sketch/sketch.ino:
--------------------------------------------------------------------------------
1 | #define TRUE 1
2 | #define FALSE 0
3 |
4 | /* 74HC595 control (address lines) */
5 | #define shiftLatchPin A1
6 | #define shiftClockPin A2
7 | #define shiftDataPin A0
8 | #define addressPinA10 13
9 |
10 | /* Data pins */
11 | #define dataB0 2
12 | #define dataB1 3
13 | #define dataB2 4
14 | #define dataB3 5
15 | #define dataB4 6
16 | #define dataB5 7
17 | #define dataB6 8
18 | #define dataB7 10
19 |
20 | /* Chip control */
21 | #define chipEnable A3
22 | #define outputEnable A4
23 | #define powerEnable A5 // For 27C16 and 27C32
24 | #define readVoltageEnable 13 // For 27C16
25 | #define programVoltageEnableC16 9 // For 27C16
26 | #define programVoltageEnableC32 12 // For 27C32 and 27C512
27 | #define programVoltageEnableOther 11 // For other
28 |
29 | /* Voltage control (for programming chips) */
30 | #define voltageControl A6
31 | #define rTop 10000.0
32 | #define rBottom 1500.0
33 |
34 | //#define MESSAGES
35 |
36 | typedef enum chipType {
37 | NONE = 0,
38 | C16 = 1,
39 | C32 = 2,
40 | C64 = 3,
41 | C128 = 4,
42 | C256 = 5,
43 | C512 = 6
44 | } Chip;
45 |
46 | typedef enum mode {
47 | WAIT,
48 | READ,
49 | WRITE,
50 | VOLTAGE
51 | } Modes;
52 |
53 |
54 | void write_mode (void);
55 | void read_mode (void);
56 | void set_address (uint16_t address);
57 | uint8_t get_data (void);
58 | void set_data (uint8_t data);
59 | uint8_t read_byte (uint16_t address);
60 | void write_byte (uint16_t address, uint8_t data);
61 | float get_voltage (void);
62 | void program_voltage_set (bool state);
63 | uint16_t gen_address (uint16_t address);
64 | void select_chip (chipType new_chip);
65 |
66 | chipType chip = NONE;
67 | Modes mode = WAIT;
68 | uint8_t log_enable = FALSE;
69 | uint16_t start_address = 0x0000;
70 | uint16_t end_address = 0x0000;
71 | #define BUF_LEN 16
72 | uint8_t buf[BUF_LEN];
73 |
74 | void message(const char* mes){
75 | if (log_enable)
76 | Serial.println(mes);
77 | }
78 |
79 | void setup() {
80 | // 74HC595 (*2)
81 | pinMode(shiftLatchPin, OUTPUT);
82 | pinMode(shiftClockPin, OUTPUT);
83 | pinMode(shiftDataPin, OUTPUT);
84 | pinMode(addressPinA10, OUTPUT);
85 |
86 | // Chip control
87 | pinMode(chipEnable, OUTPUT);
88 | pinMode(outputEnable, OUTPUT);
89 | pinMode(powerEnable, OUTPUT);
90 | pinMode(readVoltageEnable, OUTPUT);
91 | pinMode(programVoltageEnableC16, OUTPUT);
92 | pinMode(programVoltageEnableC32, OUTPUT);
93 | pinMode(programVoltageEnableOther, OUTPUT);
94 | digitalWrite(outputEnable, HIGH);
95 | digitalWrite(powerEnable, HIGH);
96 | digitalWrite(readVoltageEnable, HIGH);
97 | digitalWrite(programVoltageEnableC16, LOW);
98 | digitalWrite(programVoltageEnableC32, LOW);
99 | digitalWrite(programVoltageEnableOther, LOW);
100 | digitalWrite(chipEnable, LOW);
101 |
102 | // Data pins
103 | read_mode();
104 |
105 | Serial.begin(115200);
106 | Serial.println("Arduino 27 Series programmer");
107 | }
108 |
109 | void loop() {
110 | switch (mode) {
111 | case READ:
112 | if (chip == NONE) {
113 | mode = WAIT;
114 | break;
115 | }
116 | message("Read mode.");
117 | read_mode();
118 | if (chip == C16) digitalWrite(readVoltageEnable, LOW);
119 | digitalWrite(chipEnable, LOW);
120 | digitalWrite(outputEnable, LOW);
121 | for (uint16_t i = start_address; i <= end_address; i++) {
122 | uint8_t data = read_byte(i);
123 | Serial.write(&data, sizeof(data));
124 | if (i == end_address) break; // Защита от переполнения uint16
125 | }
126 | digitalWrite(outputEnable, HIGH);
127 | digitalWrite(chipEnable, HIGH);
128 | if (chip == C16) digitalWrite(readVoltageEnable, HIGH);
129 | mode = WAIT;
130 | break;
131 | case WRITE:
132 | if (chip == NONE) {
133 | mode = WAIT;
134 | break;
135 | }
136 | message("Write mode");
137 | /*for (int i = start_address; i <= end_address; i++) {
138 | Serial.println(i, HEX);
139 | write_byte(i, 0x89);
140 | }*/
141 | for (uint16_t i = start_address; i <= end_address; i += BUF_LEN) {
142 | Serial.print("Write block ");
143 | Serial.println(i);
144 | uint8_t count = Serial.readBytes((char*)buf, BUF_LEN);
145 | if (count != BUF_LEN) {
146 | Serial.print("Error on block");
147 | Serial.println(i);
148 | Serial.print("Received ");
149 | Serial.println(count);
150 | break;
151 | }
152 | for (uint16_t j = 0; j < BUF_LEN; j++) {
153 | // Write byte
154 | write_mode();
155 | program_voltage_set(true);
156 | write_byte((i + j), buf[j]);
157 | program_voltage_set(false);
158 |
159 | // Verify byte
160 | read_mode();
161 | if (chip == C16) digitalWrite(readVoltageEnable, LOW);
162 | digitalWrite(chipEnable, LOW);
163 | digitalWrite(outputEnable, LOW);
164 | uint8_t verify = get_data();
165 | digitalWrite(outputEnable, HIGH);
166 | digitalWrite(chipEnable, HIGH);
167 | if (chip == C16) digitalWrite(readVoltageEnable, HIGH);
168 | if (buf[j] != virify){
169 | Serial.print("Error on address ");
170 | Serial.println(i + j);
171 | mode = WAIT;
172 | }
173 | }
174 | Serial.print("Complete block ");
175 | Serial.println(i);
176 | if (i == end_address) break;
177 | }
178 | message("Write success.");
179 | mode = WAIT;
180 | break;
181 | case VOLTAGE:
182 | Serial.print("Programming voltage: ");
183 | Serial.println(get_voltage(), 1);
184 | mode = WAIT;
185 | break;
186 | default:
187 | if (chip == NONE) message("Chip not selected!");
188 | message("Wait commands...");
189 | while (Serial.available()) Serial.read();
190 | do {} while (Serial.available() == 0);
191 | char incomingByte = Serial.read();
192 | while (Serial.available()) Serial.read();
193 | switch (incomingByte) {
194 | case 'r': mode = READ; break;
195 | case 'w': mode = WRITE; break;
196 | case 'v': mode = VOLTAGE; break;
197 | case 'a': select_chip(C16); break;
198 | case 'b': select_chip(C32); break;
199 | case 'c': select_chip(C64); break;
200 | case 'd': select_chip(C128); break;
201 | case 'e': select_chip(C256); break;
202 | case 'f': select_chip(C512); break;
203 | }
204 | }
205 | }
206 |
207 | void select_chip (chipType new_chip) {
208 | digitalWrite(powerEnable, HIGH);
209 | switch (new_chip) {
210 | case C16:
211 | digitalWrite(powerEnable, LOW);
212 | chip = new_chip;
213 | end_address = 0x07ff;
214 | message("Select 27C16 chip.");
215 | break;
216 | case C32:
217 | digitalWrite(powerEnable, LOW);
218 | chip = new_chip;
219 | end_address = 0x0fff;
220 | message("Select 27C32 chip.");
221 | break;
222 | case C64:
223 | chip = new_chip;
224 | end_address = 0x1fff;
225 | message("Select 27C64 chip.");
226 | break;
227 | case C128:
228 | chip = new_chip;
229 | end_address = 0x3fff;
230 | message("Select 27C128 chip.");
231 | break;
232 | case C256:
233 | chip = new_chip;
234 | end_address = 0x7fff;
235 | message("Select 27C256 chip.");
236 | break;
237 | case C512:
238 | chip = C512;
239 | end_address = 0xffff;
240 | message("Select 27C512 chip.");
241 | break;
242 | default:
243 | chip = NONE;
244 | end_address = 0x0000;
245 | message("Chip not selected!");
246 | }
247 | }
248 |
249 |
250 | void program_voltage_set (bool state) {
251 | switch (chip) {
252 | case C16:
253 | digitalWrite(programVoltageEnableC16, state);
254 | break;
255 | case C32:
256 | case C512:
257 | digitalWrite(programVoltageEnableC32, state);
258 | break;
259 | case C64:
260 | case C128:
261 | case C256:
262 | default:
263 | digitalWrite(programVoltageEnableOther, state);
264 | }
265 | }
266 |
267 | void write_mode (void) {
268 | pinMode(dataB0, OUTPUT);
269 | pinMode(dataB1, OUTPUT);
270 | pinMode(dataB2, OUTPUT);
271 | pinMode(dataB3, OUTPUT);
272 | pinMode(dataB4, OUTPUT);
273 | pinMode(dataB5, OUTPUT);
274 | pinMode(dataB6, OUTPUT);
275 | pinMode(dataB7, OUTPUT);
276 | }
277 |
278 | void read_mode (void) {
279 | pinMode(dataB0, INPUT_PULLUP);
280 | pinMode(dataB1, INPUT_PULLUP);
281 | pinMode(dataB2, INPUT_PULLUP);
282 | pinMode(dataB3, INPUT_PULLUP);
283 | pinMode(dataB4, INPUT_PULLUP);
284 | pinMode(dataB5, INPUT_PULLUP);
285 | pinMode(dataB6, INPUT_PULLUP);
286 | pinMode(dataB7, INPUT_PULLUP);
287 | }
288 |
289 | uint16_t gen_address (uint16_t address) {
290 | byte high = highByte(address);
291 | byte low = lowByte(address);
292 | switch (chip) {
293 | case C16:
294 | break;
295 | if (mode == READ) {
296 | high |= 1 << 3; // A11 (C32+) is Vpp for C16 (5v for read)
297 | }
298 | break;
299 | case C64:
300 | case C128:
301 | if (mode == READ) {
302 | high |= 1 << 6; // A14 (C256 and C512) is ~PGM for C64 and C128
303 | }
304 | break;
305 | case C32:
306 | case C256:
307 | case C512:
308 | default:
309 | break;
310 | }
311 | return (high << 8) | low;
312 | }
313 |
314 | void set_address (uint16_t address) {
315 | address = gen_address(address);
316 | digitalWrite(shiftLatchPin, LOW);
317 | byte registerTwo = highByte(address);
318 | byte registerOne = lowByte(address);
319 | shiftOut(shiftDataPin, shiftClockPin, MSBFIRST, registerTwo);
320 | shiftOut(shiftDataPin, shiftClockPin, MSBFIRST, registerOne);
321 | digitalWrite(shiftLatchPin, HIGH);
322 | }
323 |
324 | uint8_t get_data (void) {
325 | uint8_t data = 0;
326 | data |= digitalRead(dataB0) << 0;
327 | data |= digitalRead(dataB1) << 1;
328 | data |= digitalRead(dataB2) << 2;
329 | data |= digitalRead(dataB3) << 3;
330 | data |= digitalRead(dataB4) << 4;
331 | data |= digitalRead(dataB5) << 5;
332 | data |= digitalRead(dataB6) << 6;
333 | data |= digitalRead(dataB7) << 7;
334 | return data;
335 | }
336 |
337 | void set_data (uint8_t data) {
338 | digitalWrite(dataB0, (data & (1 << 0)));
339 | digitalWrite(dataB1, (data & (1 << 1)));
340 | digitalWrite(dataB2, (data & (1 << 2)));
341 | digitalWrite(dataB3, (data & (1 << 3)));
342 | digitalWrite(dataB4, (data & (1 << 4)));
343 | digitalWrite(dataB5, (data & (1 << 5)));
344 | digitalWrite(dataB6, (data & (1 << 6)));
345 | digitalWrite(dataB7, (data & (1 << 7)));
346 | }
347 |
348 | uint8_t read_byte (uint16_t address) {
349 | set_address(address);
350 | return get_data();
351 | }
352 |
353 | void write_byte (uint16_t address, uint8_t data) {
354 | set_address(address);
355 | set_data(data);
356 | switch (chip) {
357 | case C16:
358 | digitalWrite(chipEnable, HIGH);
359 | delay(15);
360 | digitalWrite(chipEnable, LOW);
361 | break;
362 | case C32:
363 | case C64:
364 | case C128:
365 | case C256:
366 | case C512:
367 | default:
368 | digitalWrite(chipEnable, LOW);
369 | delayMicroseconds(110);
370 | digitalWrite(chipEnable, HIGH);
371 | break;
372 | }
373 | }
374 |
375 | float get_voltage (void) {
376 | float vADC = (analogRead(voltageControl) / 1024.) * 5.;
377 | float current = vADC / rBottom;
378 | return (current * (rTop + rBottom));
379 | }
380 |
--------------------------------------------------------------------------------