├── Eagle files
├── .DS_Store
├── TinyFunctionGenerator.brd
└── TinyFunctionGenerator.sch
├── README.md
└── tiny-function-generator.ino
/Eagle files/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/technoblogy/tiny-function-generator/5025d26fb67c837f9fd07a2472a5738cab536248/Eagle files/.DS_Store
--------------------------------------------------------------------------------
/Eagle files/TinyFunctionGenerator.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 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
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 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 | VCC
191 | Technoblogy
192 | Tiny Function
193 | Generator
194 | OUT
195 | OUT
196 | GND
197 | GND
198 |
199 |
200 |
201 |
202 |
203 |
204 | >NAME
205 | >VALUE
206 |
207 |
208 |
209 |
210 | <h3>SparkFun Electronics' preferred foot prints</h3>
211 | In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br>
212 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
213 | <br><br>
214 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
215 | <br><br>
216 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
217 |
218 |
219 | Simple rotary encoder, no LED, push center<br>
220 | COM-09117
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 | >VALUE
229 | >NAME
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 | <h2><b>microBuilder.eu</b> Eagle Footprint Library</h2>
243 |
244 | <p>Footprints for common components used in our projects and products. This is the same library that we use internally, and it is regularly updated. The newest version can always be found at <b>www.microBuilder.eu</b>. If you find this library useful, please feel free to purchase something from our online store. Please also note that all holes are optimised for metric drill bits!</p>
245 |
246 | <h3>Obligatory Warning</h3>
247 | <p>While it probably goes without saying, there are no guarantees that the footprints or schematic symbols in this library are flawless, and we make no promises of fitness for production, prototyping or any other purpose. These libraries are provided for information puposes only, and are used at your own discretion. While we make every effort to produce accurate footprints, and many of the items found in this library have be proven in production, we can't make any promises of suitability for a specific purpose. If you do find any errors, though, please feel free to contact us at www.microbuilder.eu to let us know about it so that we can update the library accordingly!</p>
248 |
249 | <h3>License</h3>
250 | <p>This work is placed in the public domain, and may be freely used for commercial and non-commercial work with the following conditions:</p>
251 | <p>THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252 | </p>
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 | >NAME
261 | >VALUE
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 | <h3>SparkFun Electronics' preferred foot prints</h3>
271 | In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br>
272 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
273 | <br><br>
274 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
275 | <br><br>
276 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
277 |
278 |
279 | <b>Dual In Line</b>
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 | >VALUE
296 | >NAME
297 |
298 |
299 |
300 |
301 | <h3>SparkFun Electronics' preferred foot prints</h3>
302 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br>
303 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
304 | <br><br>
305 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
306 | <br><br>
307 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 | >Name
321 | >Value
322 |
323 |
324 |
325 |
326 |
327 | >Name
328 | >Value
329 |
330 |
331 |
332 |
333 |
334 |
335 | >Name
336 | >Value
337 |
338 |
339 |
340 |
341 | <h3>SparkFun Electronics' preferred foot prints</h3>
342 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br>
343 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
344 | <br><br>
345 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
346 | <br><br>
347 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
348 |
349 |
350 | 1/4W Resistor, 0.4" wide<p>
351 |
352 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a>
353 |
354 |
355 |
356 |
357 |
358 |
359 | >Name
360 | >Value
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 | <b>EAGLE Design Rules</b>
375 | <p>
376 | Die Standard-Design-Rules sind so gewählt, dass sie für
377 | die meisten Anwendungen passen. Sollte ihre Platine
378 | besondere Anforderungen haben, treffen Sie die erforderlichen
379 | Einstellungen hier und speichern die Design Rules unter
380 | einem neuen Namen ab.
381 | <b>EAGLE Design Rules</b>
382 | <p>
383 | The default Design Rules have been set to cover
384 | a wide range of applications. Your particular design
385 | may have different requirements, so please make the
386 | necessary adjustments and save your customized
387 | design rules under a new name.
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 | Since Version 6.2.2 text objects can contain more than one line,
729 | which will not be processed correctly with this version.
730 |
731 |
732 |
733 |
--------------------------------------------------------------------------------
/Eagle files/TinyFunctionGenerator.sch:
--------------------------------------------------------------------------------
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 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
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 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | <b>PIN HEADER</b>
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 | >NAME
189 | >VALUE
190 |
191 |
192 |
193 |
194 | >NAME
195 | >VALUE
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | >NAME
208 | >VALUE
209 |
210 |
211 |
212 |
213 |
214 | <b>Pin header 1x1 for 0.1" spacing</b>
215 | <p>
216 | With round pins
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 | <h3>SparkFun Electronics' preferred foot prints</h3>
251 | In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br>
252 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
253 | <br><br>
254 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
255 | <br><br>
256 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
257 |
258 |
259 | Simple rotary encoder, no LED, push center<br>
260 | COM-09117
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 | >VALUE
269 | >NAME
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 | Simple rotary encode<br>
283 | Center push button<br>
284 | Gray code output<br>
285 | No illumination
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 | >NAME
301 | >VALUE
302 |
303 |
304 |
305 |
306 | Simple no LED rotary encoder<br>
307 | Example: COM-09117
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 | <h2><b>microBuilder.eu</b> Eagle Footprint Library</h2>
330 |
331 | <p>Footprints for common components used in our projects and products. This is the same library that we use internally, and it is regularly updated. The newest version can always be found at <b>www.microBuilder.eu</b>. If you find this library useful, please feel free to purchase something from our online store. Please also note that all holes are optimised for metric drill bits!</p>
332 |
333 | <h3>Obligatory Warning</h3>
334 | <p>While it probably goes without saying, there are no guarantees that the footprints or schematic symbols in this library are flawless, and we make no promises of fitness for production, prototyping or any other purpose. These libraries are provided for information puposes only, and are used at your own discretion. While we make every effort to produce accurate footprints, and many of the items found in this library have be proven in production, we can't make any promises of suitability for a specific purpose. If you do find any errors, though, please feel free to contact us at www.microbuilder.eu to let us know about it so that we can update the library accordingly!</p>
335 |
336 | <h3>License</h3>
337 | <p>This work is placed in the public domain, and may be freely used for commercial and non-commercial work with the following conditions:</p>
338 | <p>THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
339 | </p>
340 |
341 |
342 | <b>PIN HEADER</b>
343 |
344 |
345 |
346 |
347 |
348 | >NAME
349 | >VALUE
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 | >NAME
362 | >VALUE
363 |
364 |
365 |
366 |
367 |
368 |
369 | <p><b>Pin Headers</b><br/>
370 | 4 Pin, 0.1"/2.54mm pitch, SMT</p>
371 |
372 |
373 |
374 |
375 |
376 | >NAME
377 | >VALUE
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 | >NAME
386 | >VALUE
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 | >NAME
395 | >VALUE
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 | >NAME
409 | >VALUE
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 | <b>PIN HEADER</b>
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 | <h3>SparkFun Electronics' preferred foot prints</h3>
484 | In this library you'll find all manner of digital ICs- microcontrollers, memory chips, logic chips, FPGAs, etc.<br><br>
485 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
486 | <br><br>
487 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
488 | <br><br>
489 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
490 |
491 |
492 | Fits EIAJ packages (wide version of the SOIC-8).
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 | >VALUE
507 | >NAME
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 | <b>Dual In Line</b>
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 | >VALUE
535 | >NAME
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 | >Value
545 | >Name
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 | Atmel 8-pin 2/4/8kB flash uC
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 | <h3>SparkFun Electronics' preferred foot prints</h3>
641 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br>
642 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
643 | <br><br>
644 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
645 | <br><br>
646 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
647 |
648 |
649 |
650 |
651 |
652 | >Name
653 | >Value
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 | >Name
664 | >Value
665 |
666 |
667 |
668 |
669 |
670 |
671 | >NAME
672 | >VALUE
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 | >Name
682 | >Value
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 | >NAME
700 | >VALUE
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 | >NAME
715 | >VALUE
716 |
717 |
718 |
719 |
720 |
721 | <b>CAPACITOR</b><p>
722 | chip
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 | >NAME
733 | >VALUE
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 | >Name
743 | >Value
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 | >Name
757 | >Value
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 | >NAME
769 | >VALUE
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 | >NAME
781 | >VALUE
782 |
783 |
784 |
785 |
786 |
787 | CTZ3 Series land pattern for variable capacitor - CTZ3E-50C-W1-PF
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 | >NAME
806 | >VALUE
807 |
808 |
809 | <h3>CAP-PTH-SMALL-KIT</h3>
810 | Commonly used for small ceramic capacitors. Like our 0.1uF (http://www.sparkfun.com/products/8375) or 22pF caps (http://www.sparkfun.com/products/8571).<br>
811 | <br>
812 | <b>Warning:</b> This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 | This is the "EZ" version of the .1" spaced ceramic thru-hole cap.<br>
847 | It has reduced top mask to make it harder to put the component on the wrong side of the board.
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 | >Name
856 | >Value
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 | >Name
868 | >Value
869 |
870 |
871 |
872 |
873 |
874 | >Name
875 | >Value
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 | >NAME
890 | >VALUE
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 | >NAME
902 | >VALUE
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 | <b>Capacitor</b>
912 | Standard 0603 ceramic capacitor, and 0.1" leaded capacitor.
913 |
914 |
915 |
916 |
917 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
928 |
929 |
930 |
931 |
932 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
957 |
958 |
959 |
960 |
961 |
962 |
963 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
976 |
977 |
978 |
979 |
980 |
981 |
982 |
983 |
984 |
985 |
986 |
987 |
988 |
989 |
990 |
991 |
992 |
993 |
994 |
995 |
996 |
997 |
998 |
999 |
1000 |
1001 |
1002 |
1003 |
1004 |
1005 |
1006 |
1007 |
1008 |
1009 |
1010 |
1011 |
1012 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 |
1019 |
1020 |
1021 |
1022 |
1023 |
1024 |
1025 |
1026 |
1027 |
1028 |
1029 |
1030 |
1031 |
1032 |
1033 |
1034 |
1035 |
1036 |
1037 |
1038 |
1039 |
1040 |
1041 |
1042 |
1043 |
1044 |
1045 |
1046 | CAP-08440
1047 |
1048 |
1049 |
1050 |
1051 |
1052 |
1053 |
1054 |
1055 |
1056 |
1057 |
1058 |
1059 |
1060 |
1061 |
1062 |
1063 |
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 |
1071 |
1072 |
1073 |
1074 |
1075 |
1076 |
1077 |
1078 | <h3>SparkFun Electronics' preferred foot prints</h3>
1079 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br>
1080 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.
1081 | <br><br>
1082 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/
1083 | <br><br>
1084 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.
1085 |
1086 |
1087 | 1/4W Resistor, 0.4" wide<p>
1088 |
1089 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a>
1090 |
1091 |
1092 |
1093 |
1094 |
1095 |
1096 | >Name
1097 | >Value
1098 |
1099 |
1100 |
1101 |
1102 |
1103 |
1104 |
1105 |
1106 |
1107 |
1108 | >NAME
1109 | >VALUE
1110 |
1111 |
1112 |
1113 |
1114 |
1115 |
1116 |
1117 |
1118 |
1119 |
1120 |
1121 |
1122 |
1123 |
1124 |
1125 | >Name
1126 | >Value
1127 |
1128 |
1129 | <b>RESISTOR</b><p>
1130 | chip
1131 |
1132 |
1133 |
1134 |
1135 |
1136 |
1137 |
1138 |
1139 |
1140 |
1141 | >NAME
1142 | >VALUE
1143 |
1144 |
1145 |
1146 |
1147 |
1148 |
1149 |
1150 |
1151 | >NAME
1152 | >VALUE
1153 |
1154 |
1155 |
1156 |
1157 |
1158 |
1159 |
1160 |
1161 |
1162 |
1163 |
1164 |
1165 |
1166 |
1167 | >NAME
1168 | >VALUE
1169 |
1170 |
1171 |
1172 |
1173 |
1174 |
1175 | 1/6W Thru-hole Resistor - *UNPROVEN*
1176 |
1177 |
1178 |
1179 |
1180 |
1181 |
1182 | >NAME
1183 | >VALUE
1184 |
1185 |
1186 |
1187 |
1188 |
1189 |
1190 | >NAME
1191 | >VALUE
1192 |
1193 |
1194 |
1195 |
1196 |
1197 |
1198 |
1199 |
1200 | 1/2W Resistor, 0.5" wide<p>
1201 |
1202 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a>
1203 |
1204 |
1205 |
1206 |
1207 |
1208 |
1209 | >Name
1210 | >Value
1211 |
1212 |
1213 | 1W Resistor, 0.6" wide<p>
1214 |
1215 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a>
1216 |
1217 |
1218 |
1219 |
1220 |
1221 |
1222 | >Name
1223 | >Value
1224 |
1225 |
1226 | 2W Resistor, 0.8" wide<p>
1227 |
1228 | Yageo CFR series <a href="http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf">http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf</a>
1229 |
1230 |
1231 |
1232 |
1233 |
1234 |
1235 | >Name
1236 | >Value
1237 |
1238 |
1239 | <h3>AXIAL-0.3-KIT</h3>
1240 |
1241 | Commonly used for 1/4W through-hole resistors. 0.3" pitch between holes.<br>
1242 | <br>
1243 |
1244 | <b>Warning:</b> This is the KIT version of the AXIAL-0.3 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.
1245 |
1246 |
1247 |
1248 |
1249 |
1250 |
1251 |
1252 |
1253 |
1254 |
1255 | >Name
1256 | >Value
1257 |
1258 |
1259 |
1260 |
1261 |
1262 |
1263 |
1264 |
1265 |
1266 |
1267 |
1268 |
1269 |
1270 |
1271 |
1272 |
1273 |
1274 |
1275 |
1276 |
1277 |
1278 |
1279 |
1280 |
1281 |
1282 |
1283 | This is the "EZ" version of the standard .3" spaced resistor package.<br>
1284 | It has a reduced top mask to make it harder to install upside-down.
1285 |
1286 |
1287 |
1288 |
1289 |
1290 |
1291 |
1292 |
1293 |
1294 |
1295 | >Name
1296 | >Value
1297 |
1298 |
1299 |
1300 |
1301 |
1302 |
1303 |
1304 |
1305 |
1306 |
1307 |
1308 |
1309 | >Name
1310 | >Value
1311 |
1312 |
1313 |
1314 |
1315 |
1316 |
1317 |
1318 |
1319 |
1320 |
1321 |
1322 |
1323 |
1324 | >Name
1325 | >Value
1326 |
1327 |
1328 | <b>CAPACITOR</b><p>
1329 | chip
1330 |
1331 |
1332 |
1333 |
1334 |
1335 |
1336 |
1337 |
1338 | >NAME
1339 | >VALUE
1340 |
1341 |
1342 |
1343 |
1344 |
1345 |
1346 |
1347 |
1348 |
1349 |
1350 |
1351 |
1352 |
1353 |
1354 |
1355 |
1356 |
1357 | >NAME
1358 | >VALUE
1359 |
1360 |
1361 |
1362 |
1363 |
1364 |
1365 | <b>Resistor</b>
1366 | Basic schematic elements and footprints for 0603, 1206, and PTH resistors.
1367 |
1368 |
1369 |
1370 |
1371 |
1372 |
1373 |
1374 |
1375 |
1376 |
1377 |
1378 |
1379 |
1380 |
1381 |
1382 |
1383 |
1384 |
1385 |
1386 |
1387 |
1388 |
1389 |
1390 |
1391 |
1392 |
1393 |
1394 |
1395 |
1396 |
1397 |
1398 |
1399 |
1400 |
1401 |
1402 |
1403 |
1404 |
1405 |
1406 |
1407 |
1408 |
1409 |
1410 |
1411 |
1412 |
1413 |
1414 |
1415 |
1416 |
1417 |
1418 |
1419 |
1420 |
1421 |
1422 |
1423 |
1424 |
1425 |
1426 |
1427 |
1428 |
1429 |
1430 |
1431 |
1432 |
1433 |
1434 |
1435 |
1436 |
1437 |
1438 |
1439 |
1440 |
1441 |
1442 |
1443 |
1444 |
1445 |
1446 |
1447 |
1448 |
1449 |
1450 |
1451 |
1452 |
1453 |
1454 |
1455 |
1456 |
1457 |
1458 |
1459 |
1460 |
1461 |
1462 |
1463 |
1464 |
1465 |
1466 |
1467 |
1468 |
1469 |
1470 |
1471 |
1472 |
1473 |
1474 |
1475 |
1476 |
1477 |
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 |
1521 |
1522 |
1523 |
1524 |
1525 |
1526 |
1527 |
1528 |
1529 |
1530 |
1531 |
1532 |
1533 |
1534 |
1535 |
1536 |
1537 |
1538 |
1539 |
1540 |
1541 |
1542 |
1543 |
1544 |
1545 |
1546 |
1547 |
1548 |
1549 |
1550 |
1551 |
1552 |
1553 |
1554 |
1555 |
1556 |
1557 |
1558 |
1559 |
1560 |
1561 |
1562 |
1563 |
1564 |
1565 |
1566 |
1567 |
1568 |
1569 |
1570 |
1571 |
1572 |
1573 |
1574 |
1575 |
1576 |
1577 |
1578 |
1579 |
1580 |
1581 |
1582 |
1583 |
1584 |
1585 |
1586 |
1587 |
1588 |
1589 |
1590 |
1591 |
1592 |
1593 |
1594 |
1595 |
1596 |
1597 |
1598 |
1599 |
1600 |
1601 |
1602 |
1603 |
1604 |
1605 |
1606 |
1607 |
1608 |
1609 |
1610 |
1611 |
1612 |
1613 |
1614 |
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Tiny Function Generator
2 | A signal generator based on an ATtiny85 that uses Direct Digital Synthesis to generate a range of different waveforms, including sine, square, triangle, and noise. See http://www.technoblogy.com/show?2FCL.
3 |
--------------------------------------------------------------------------------
/tiny-function-generator.ino:
--------------------------------------------------------------------------------
1 | /* Tiny Function Generator PCB
2 |
3 | David Johnson-Davies - www.technoblogy.com - 7th February 2019
4 | ATtiny85 @ 8 MHz (internal PLL; BOD disabled)
5 |
6 | CC BY 4.0
7 | Licensed under a Creative Commons Attribution 4.0 International license:
8 | http://creativecommons.org/licenses/by/4.0/
9 | */
10 |
11 | #include
12 | #define NOINIT __attribute__ ((section (".noinit")))
13 |
14 | // Don't initialise these on reset
15 | int Wave NOINIT;
16 | unsigned int Freq NOINIT;
17 | int8_t Sinewave[256] NOINIT;
18 |
19 | typedef void (*wavefun_t)();
20 |
21 | // Direct Digital Synthesis **********************************************
22 |
23 | volatile unsigned int Acc, Jump;
24 | volatile signed int X, Y;
25 |
26 | void SetupDDS () {
27 | // Enable 64 MHz PLL and use as source for Timer1
28 | PLLCSR = 1<>6;
49 | }
50 | }
51 |
52 | void Sine () {
53 | Acc = Acc + Jump;
54 | OCR1A = Sinewave[Acc>>8] + 128;
55 | }
56 |
57 | void Sawtooth () {
58 | Acc = Acc + Jump;
59 | OCR1A = Acc >> 8;
60 | }
61 |
62 | void Square () {
63 | Acc = Acc + Jump;
64 | int8_t temp = Acc>>8;
65 | OCR1A = temp>>7;
66 | }
67 |
68 | void Rectangle () {
69 | Acc = Acc + Jump;
70 | int8_t temp = Acc>>8;
71 | temp = temp & temp<<1;
72 | OCR1A = temp>>7;
73 | }
74 |
75 | void Triangle () {
76 | int8_t temp, mask;
77 | Acc = Acc + Jump;
78 | temp = Acc>>8;
79 | mask = temp>>7;
80 | temp = temp ^ mask;
81 | OCR1A = temp<<1;
82 | }
83 |
84 | void Chainsaw () {
85 | int8_t temp, mask, top;
86 | Acc = Acc + Jump;
87 | temp = Acc>>8;
88 | mask = temp>>7;
89 | top = temp & 0x80;
90 | temp = (temp ^ mask) | top;
91 | OCR1A = temp;
92 | }
93 |
94 | void Pulse () {
95 | Acc = Acc + Jump;
96 | int8_t temp = Acc>>8;
97 | temp = temp & temp<<1 & temp<<2 & temp<<3;
98 | OCR1A = temp>>7;
99 | }
100 |
101 | void Noise () {
102 | int8_t temp = Acc & 1;
103 | Acc = Acc >> 1;
104 | if (temp == 0) Acc = Acc ^ 0xB400;
105 | OCR1A = Acc;
106 | }
107 |
108 | const int nWaves = 8;
109 | wavefun_t Waves[nWaves] = {Sine, Triangle, Sawtooth, Square, Rectangle, Pulse, Chainsaw, Noise};
110 | wavefun_t Wavefun;
111 |
112 | ISR(TIMER0_COMPA_vect) {
113 | Wavefun();
114 | }
115 |
116 | // OLED I2C 128 x 32 monochrome display **********************************************
117 |
118 | const int OLEDAddress = 0x3C;
119 |
120 | // Initialisation sequence for OLED module
121 | int const InitLen = 24;
122 | const unsigned char Init[InitLen] PROGMEM = {
123 | 0xAE, // Display off
124 | 0xD5, // Set display clock
125 | 0x80, // Recommended value
126 | 0xA8, // Set multiplex
127 | 0x1F,
128 | 0xD3, // Set display offset
129 | 0x00,
130 | 0x40, // Zero start line
131 | 0x8D, // Charge pump
132 | 0x14,
133 | 0x20, // Memory mode
134 | 0x01, // Vertical addressing
135 | 0xA1, // 0xA0/0xA1 flip horizontally
136 | 0xC8, // 0xC0/0xC8 flip vertically
137 | 0xDA, // Set comp ins
138 | 0x02,
139 | 0x81, // Set contrast
140 | 0x7F, // 0x00 to 0xFF
141 | 0xD9, // Set pre charge
142 | 0xF1,
143 | 0xDB, // Set vcom detect
144 | 0x40,
145 | 0xA6, // Normal (0xA7=Inverse)
146 | 0xAF // Display on
147 | };
148 |
149 | const int data = 0x40;
150 | const int single = 0x80;
151 | const int command = 0x00;
152 |
153 | void InitDisplay () {
154 | Wire.beginTransmission(OLEDAddress);
155 | Wire.write(command);
156 | for (uint8_t c=0; c>8); }
242 | }
243 | }
244 | Wire.endTransmission();
245 | }
246 |
247 | uint8_t DigitChar (unsigned int number, unsigned int divisor) {
248 | return (number/divisor) % 10;
249 | }
250 |
251 | // Display waveform icon
252 | void PlotIcon (int wave, int line, int column) {
253 | PlotChar(Icons+2*wave, line, column); column = column + Scale;
254 | PlotChar(Icons+2*wave+1, line, column);
255 | }
256 |
257 | // Display a 5-digit frequency starting at line, column
258 | void PlotFreq (unsigned int freq, int line, int column) {
259 | boolean dig = false;
260 | for (unsigned int d=10000; d>0; d=d/10) {
261 | char c = DigitChar(freq, d);
262 | if (c == 0 && !dig) c = Space; else dig = true;
263 | PlotChar(c, line, column);
264 | column = column + Scale;
265 | }
266 | PlotChar(Hz, line, column); column = column + Scale;
267 | PlotChar(Hz+1, line, column);
268 | }
269 |
270 | // Rotary encoder **********************************************
271 |
272 | const int EncoderA = 4;
273 | const int EncoderB = 3;
274 | const int MinFreq = 1; // Hz
275 | const int MaxFreq = 5000; // Hz
276 |
277 | volatile int a0;
278 | volatile int c0;
279 | volatile int Count = 0;
280 |
281 | void SetupRotaryEncoder () {
282 | pinMode(EncoderA, INPUT_PULLUP);
283 | pinMode(EncoderB, INPUT_PULLUP);
284 | PCMSK = 1<= 1000) step = 100;
293 | else if (Freq >=100) step = 10;
294 | Freq = max(min((Freq + (Up ? step : -step)), MaxFreq), MinFreq);
295 | PlotFreq(Freq, 1, 7);
296 | Jump = Freq*4;
297 | }
298 |
299 | // Pin change interrupt service routine
300 | ISR (PCINT0_vect) {
301 | int a = PINB>>EncoderA & 1;
302 | int b = PINB>>EncoderB & 1;
303 | if (a != a0) { // A changed
304 | a0 = a;
305 | if (b != c0) {
306 | c0 = b;
307 | ChangeValue(a == b);
308 | }
309 | }
310 | }
311 |
312 | // Setup **********************************************
313 |
314 | void setup() {
315 | Wire.begin();
316 | // Is it a power-on reset?
317 | if (MCUSR & 1) {
318 | Wave = 0; Freq = 100; // Start with 100Hz Sine
319 | CalculateSine();
320 | InitDisplay();
321 | ClearDisplay();
322 | }
323 | else Wave = (Wave+1) % nWaves;
324 | Wavefun = Waves[Wave];
325 | MCUSR = 0;
326 | SetupDDS();
327 | SetupRotaryEncoder();
328 | Jump = Freq*4;
329 | PlotFreq(Freq, 1, 7);
330 | PlotIcon(Wave, 1, 0);
331 | }
332 |
333 | // Everything done by interrupts
334 | void loop() {
335 | }
336 |
--------------------------------------------------------------------------------