File size: 100,890 Bytes
0a07869
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dc304c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331062c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
191
192
193
194
195
196
197
198
199
200
201
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
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
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
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
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
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
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
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
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
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
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
-----
--- 2588466
Previous thread: >>2571738

Here we discuss microcontrollers, SBCs and microcontroller accessories, such as Atmel mega and tiny AVRs (Arduinos), PICs, ARM boards such as blue/black pill STM32, ESP8266/32s, RP2040, Raspberry Pi, and others.

For general electronics questions (power supplies, level shifting, motor driving, etc.) please ask /ohm/.

>where can I find verified quality microcontrollers and other electronic sensors or parts
digikey.com
mouser.com
arrow.com
newark.com

>but that's too expensive
aliexpress.com (many parts here are fake, particularly specific parts out of stock in the above sites)
lcsc.com

>I need a part that does X and Y, with Z specifications. How can I find it?
use digikey or mouser's parametric part search. Then purchase from one of the sellers listed above.

>how do I get started with microcontrollers, where should I start?
There is no defined starting point, grab a book and start reading or buy an arduino off ebay/amazon and start messing around. There are a plethora of examples online to get started.

>resources:
https://github.com/kitspace/awesome-electronics
--- 2588765
What's the most powerful RISC-V board thats obtainable?
--- 2588834
>>2588765
It will come when apple drops m1/2/arm,
Not before. It’s just a niche experiment right now.
--- 2588864
>>2588834
>It will come when apple drops m1/2/arm,
Those aren't microcontrollers. Linux boards are over there in /g/. --->
It's China that is most likely to have an effect on where RISC-V goes in the microcontroller market.
--- 2588880
>>2588765
What's the cheapest RISC-V board that's available at all?
--- 2588906
>>2588864
Hint: SBCs can be used as microcontrollers. Just don't put an operating system on there, flash raw RISC-V machine code onto its memory instead. The memory address at which it expects its startup code is probably defined somewhere in the datasheet, though maybe you need to put that in bios.

>>2588880
Probably the ESP32C3. The CH32V/GD32V MCUs might be a bit cheaper, and be a more well-rounded design, I don't know if there's a board out for them yet. You also need to use a dedicated RISC-V programmer for those, while the ESP32C3 can still be programmed via UART, I think.
--- 2588970
>>2588906
>Just don't put an operating system on there
Do you know what M1 and M2 are? Yeah, just try that.
--- 2588982
>>2588970
I'm not talking about Apple's M1 and M2 chips, because they're ARM. I'm talking about RISC-V SBCs, the so-called "Linux boards" in the post I replied to. Learn to reading comprehension.
--- 2588992
>>2588970
Even the latest amd and intel processors start up in this microcontroller-like state known as “real mode” which is a bit like an 80186/80286 era thing… Of which, we had microcontrollers.
--- 2589003
>>2588906
Are the peripherals even documented? And good luck trying to use advanced stuff like the GPU. Are the Apple chips even available to the general market? I would even suspect that whatever bootloader this thing has is locked down to only execute code signed by Apple.
--- 2589014
>>2589003
>Are the peripherals even documented
Probably not for apple since they're not aimed at outside developers to write bare-metal code for. But SBCs like the raspberry pi have been used to run bare metal code before, so I suspect there's some degree of documentation for them.
>good luck trying to use advanced stuff like the GPU
It's just a matter of whether it's documented or not. Even if it isn't, it's probably possible to reverse engineer a C compiler to see how it sends data to and from the GPU (especially generic data like for machine learning), and use some smarts to figure out how to get that same structure without an OS. But I'm hardly knowledgable about this.
>Are the Apple chips even available to the general market
No they're not. That said, you might be able to use a mac mini this way if you could reflash the bios, which you probably can. But when it comes to processors this powerful you really need to know what the fuck you're doing to write bare metal code for them. You're almost always best off running either a lightweight linux distro, or some sort of RTOS, and developing code to run atop that.
--- 2589017
>>2589014
>But when it comes to processors this powerful you really need to know what the fuck you're doing to write bare metal code for them.
You make it sound so hardcore, but I've written bare metal for 32 bit ARM CPUs before, that use the same architecture as desktop class CPUs. The Apple CPUs use AArch64, but it's not that different, and it's the same architecture as 64 bit RPIs. All the mystery is in the peripherals, which are not standardized.
--- 2589217
>>2588466 (OP)
Dumb beginner here, maybe someone will have pity and help: I was trying to log some data to an SD card using sparkfuns openlog i2c device (with their library) and an arduino nano. Things would break down and the microcontroller would freeze after about 200-300 writes. Data was just an incrementing number, just needed to keep track of a timed process thru power outages or other disruptions. 

any ideas what couldve caused this? I tried getting the openlog chip's status and itd be fine for a while, then start throwing errors such as 'sd card not open for logging' or comm failure etc. Could the noise from a nearby vfd cause this?
--- 2589263
>>2589217
Noise definitely could be an issue, I've had problems with VCC not being solid enough without an external capacitor with an SD card. It could be that the power rail was sketchy enough that it occasionally lost power, and once in a blue moon this happens during a write, causing it to fail.
--- 2589363
>>2589217
sounds like a classic "stuck I2C low/high" issue. you should occasionally reset the bus lines. but it could be as simple as the chip failed to acknowledge a write properly. this again means you need to reset the i2c bus
--- 2589365
>>2589363
Oh man, I had to deal with stuck I2C in an actual product I was working on years ago. The worst is when the system resets during a transfer and a device is stuck in the middle of the transfer. I ended up writing code that put the pins into GPIO mode and forced out nine clocks, I called it whenever I2C timed out.
--- 2589759
Finally going beyond the blink sketch on my Nano 33 IoT I was bummed out about not getting any peripherals to work. 
I learned it only outputs 2,7V at the VUSB header until I shorted a juper for 5V and now have the servo flexing. This worked despite the following claim:
>NOTE: Arduino Nano 33 IoT and Nano 33 IoT with headers only supports 3.3V I/Os and is NOT 5V tolerant so please make sure you are
not directly connecting 5V signals to this board or it will be damaged. 
Yeah, duh. But this:
>Also, as opposed to Arduino Nano boards that support 5V
operation, the 5V pin does NOT supply voltage but is rather connected, through a jumper, to the USB power input.
Was just about to possible fry the board by uploading the distance sensor sketch and recieving 5V signals back from it - YIKES! Gotto b carfull around here,,, I'll put some diodes in series for voltage drop tomorrow.
Next step after that is an old 4-pin HDD motor. I've got the common lead marked and some sketch for driving it among the bookmarks.
Final goal is an indoor wifi controlled air-ship, possible with a laptop camera streaming the journey as I saw this board has USB Host support after shorting the jumper and plugging in power via the VUSB header!?!
>1. The board can support USB host mode only if powered via the VUSB pin and if the jumper close to the VUSB pin is shorted.
You reckon I could fit drivers for it??? What a great starter board this turned out to be for a hobby coder like myself.
--- 2589763
>>2589759
Why would you get 5V back from the distance sensor? Assuming it's 3.3V tolerant, just connect the sensor to the 3.3V pin for power.

>You reckon I could fit drivers for it
For the USB laptop webcam? Maybe, but the data transfer speed is going to hit a brick wall. There's a reason people use raspberry pis for computer vision.
--- 2589878
just set up a lora sniffer, wonder what i'll find?
--- 2589880
>>2589363
>>2589365
Huh, so do I just use something along the lines of wire.end if I get any status that isnt good? 
I guess I could check status before and after the write so that it can re-attempt the write if theres an anomaly, but id still be worried about missed data. Is there a more direct way to check if a write was successful?
--- 2589881
>>2589263
weird part about it was that it was pretty consistently after 200 or so operations, if it were noise id expect it to happen randomly
--- 2589885
>>2589881
Then I'd maybe wonder if it's a memory leak issue somehow. If you got a proper debugging probe you could inspect the contents of RAM while it operates. Even if you don't, you could probably write a code to dump the RAM into the SD card as well, to see how it changes as a function of time. Though being able to inspect things like the program pointer and such would be further benefits of a debugging probe.

I'd also try rebooting the SD card connection after each write, or doing what the other anon suggests and bit-bang the next byte whenever it fails.
--- 2589918
>>2589880
this is the problem with tarduino you dont learn anything about the actual protocol. 

with I2C, after every 8 clock cycles, the devices either ACK or NACK. during writes, this is done by having the master relinquish control of the SDA line, and on the 9th SCL pulse it reads the level of SDA. if the slave device NACKs its own address when beginning ANY operation, you can immediately deduct either: the device isnt online, or its stuck and needs a reset. in this case you would do what the other anons said. send a series of SCL pulses followed by pulling both SDA and SCL high. the ultimate reset is to attach a pmos to the vcc of the slave device and do a hard reset by powering it off for like 100-1000ms and turning it back on, and reinitialising. to tell whether this happens, those wire.x functions should have a return value telling you whether or not the slave ACKd properly or not you should he checking this after every wire.x call that isnt a start, stop or repeated start
--- 2589994
>>2589878
Lots of temperatures as landlords install these wireless lora enabled temperature sensors. 
They should hold a charge for up to 10 years.
--- 2590134
>>2589994
Nothing all night. Maybe it's set up wrong.
--- 2590666
>>2588466 (OP)
Good morning, sirs. I am trying to *selectively* disconnect stations from a softAP on an esp8266 using the arduino framework, but this does not seem to be supported, despite the existence of an AT command. The closest I could find is `WiFi.softAPdisconnect` which disconnects ALL stations, but doesn't seem to call any undocumented method for disconnecting individual stations, unfortunately. I am in over my head and would really appreciate guidance.
>https://docs.espressif.com/projects/esp-at/en/release-v2.2.0.0_esp8266/AT_Command_Set/Wi-Fi_AT_Commands.html#cmd-qif
>https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/soft-access-point-class.html#softapdisconnect
--- 2590992
Is there anything below a raspberry PI that can do HDMI? I don't want to have to run Linux.
--- 2590995
>>2590666
it looks like the HAL and framework don't have access to the root ethernet protocol, so they don't know anything about MAC addresses to be able to blacklist one.
--- 2590996
>>2590992
Most of them. Orange Pi Zero 2 or the Le Potato off the top of my head, have pretty good graphics power for their prices.
--- 2590997
>>2590996
But do they have code or at least docs available to use them effectively in bare metal?
--- 2590999
>>2590997
>use them effectively in bare metal?
the Rpi doesn't even have this. This is a terrible idea.
--- 2591004
>>2590999
The RPi is a mobile phone SoC. Of course it's hard to use it in bare metal mode. I'm asking for something simpler, that can do HDMI.
--- 2591005
>>2591004
>do HDMI.
It's just that almost none of them do this, actually giving you access to the pins/traces being used for HDMI. They have some kind of abstraction layer or iGPU (or actual GPU built into the hdmi protocol die), that does it all for you under SDL or some terrible boilerplate framework.
--- 2591140
Help me /diy/, how the FUCK do i alter pitch on picrel audio reproduction? Its like unhackable, nothing i do to it changes anything. Its used in a voice recorder circuit, slaves for some erased top mystery microcontroller. Nothing i do alters anything pitch, i can make it glitch and thats about it. Tried injecting ext clock to pin 6 which according to datasheet is CLK input, did nothing.
--- 2591144
>>2591140
>did nothing
As in, stopped working. Microcontroller pin that goes into flash CLK pin, shows nothing, 0 volt, no waveform nor anything clock resembling.
--- 2591145
>>2591140
>picrel audio reproduction?
that is not at all what that chip does. It's just memory storing samples one at a time Basically it stores a sine or sawtooth or whatever wave as a picrel, just a list of amplitudes in order. You'd have to increase the clock driving your MCU or change its code.

https://en.wikipedia.org/wiki/Sample-based_synthesis

https://en.wikipedia.org/wiki/Sampler_(musical_instrument)#Sample_storage
--- 2591148
>>2591145
>picrel
--- 2591149
>>2591145
>increase the clock driving your MCU or change its code.
Or rewrite the memory, making the actual waves stored as data a different freq. But you wouldn't be able to change or sweep it when operating.
--- 2591207
>>2589918
Guilty as charged. I just wanted some quick and cheap standalone logging method without investing too much time into figuring things out. I went with a commercial solution for what I was working on for now, cost about 10x more but I guess if it works... 

Thanks for the spoonfeeding anon.
--- 2591267
>>2591145
>>2591149
The audio is amplified directly from the flash chip. No dac. Its not a wavetable player or whatever synthesis method youre thinking this is. Its an audio message recorder. Anyway this mystery mcu, i cant find the parts that sustain its clock, no crystal in sight. I see two caps that i guess could be acting as resonators for some internal clock but taking them out does nothing. Id say this whole thing has no external parts, i hate it, cant be bent.
--- 2591269
>>2591267
>The audio is amplified directly from the flash chip.
It is not, sorry. The chip is binary NAND flash. You ask it for an address and it gives you a value, 100% digital, over some serial protocol. It can't put out any voltage other than 0 or its Vcc.

>wavetable player
totally unrelated, people use this term wrong 99% of the time. The fact that you say wavetable instead of sampler shows you shouldn't be doing audio.

>Its an audio message recorder. 
It records to that memory chip at a fixed rate and plays back at (the same) fixed rate too, that's all.
--- 2591272
>>2591267
>cant find the parts that sustain its clock
it is provided by whatever microprocessor is driving it. That "host" device defines the clock frequency which the "slave" device's spi peripheral and HAL adapts to. See >>2591269, it looks like pin #6.

It's important to know this clock rate isn't the sampling rate though! The SPI interface goes through multiple clock cycles for each byte transmitted. The controller can also ask for samples at different times, with different gaps between them, irrespective of the underlying clock speed.
--- 2591316
>>2591267
>i cant find the parts that sustain its clock, no crystal in sight
Don't they often have an internal oscillator, which tends to be inaccurate.
--- 2591378
>>2591272
>>2591140
>Tried injecting ext clock to pin 6 which according to datasheet is CLK input
in my first post i addressed pin 6, injecting external clock renders the module inactive. still cant figure out what is actually injected in pin 6, as said before, theres nothing resembling clock signal present at the junction of pin 6 and incoming "signal" on scope (theres none), when measured it gives 0V iirc .
--- 2591464
>>2591378
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface
--- 2591478
>>2591140
transfer functions?
transforms?
--- 2591511
I'm trying to into PLC's and troubleshooting solid state components, right now im reading the Navy ET manuals to understand the basics since i work in ship engineering, anyone have advice on learning material or hands on stuff i can do?
--- 2591540
>>2591378
>injecting external clock renders the module inactive
yep, because you can't do that, your messages between devices are no longer aligned to the clock, the input regs cannot parse the bits.
--- 2591541
>>2591464
REEE
--- 2591545
>>2591540
i was guessing that. so this fuckign thing is unhackabe unbendable, and also cant mod it because the chip has its face erased bc fucking chinks worrying about copy imagine that.
--- 2591547
>>2591545
If you just want to multiply a frequency on an analog wire, (or mix two together) there are lots of chips that just do that, you could just add one on inline.
--- 2591555
>>2591547
mcu master cock is internal and hard set. i guess ill just live with the unbendable nature of this thing and use it for crude looping
--- 2591557
>>2591555
No, I mean you can multiply/divide or mix up the actual analog signal coming out of the DAC and leading into the output amplifier.

https://en.wikipedia.org/wiki/Frequency_multiplier
https://en.wikipedia.org/wiki/Heterodyne
--- 2591560
>>2591557
This is what most fx pedals do. They're not actually changing your instrument's or pickups properties. Just creating a new signal based on the original one.
--- 2591687
anyone has a good tutorial on how to setup the DMA table to sample multiple channels on the ESP32?
--- 2591688
>>2591687
>sample multiple channels
analog inputs?
--- 2591692
>>2591688
yes
--- 2591751
>>2591692
It is part of the I2S (an analog sound interconnect) peripheral. Official documentation is kind of poor but you want the I2S section, not the ADC section. You can only use I2S0, not I2S1. github spergs have examples. https://github.com/espressif/esp-idf/pull/1991
--- 2591775
/rcg/ signing in

I have an old rasp pi infra-red camera that I found, and also old FPV goggles. I thought it would be cool if I could night vision around the house so I ripped the FPV goggles apart. 

The old VRX (on the right) had a vid out signal going into the monitor microcontroller. The infra-red camera has a Rasp Pi standard Camera Serial Interface (CSI). Is there anyway to cheaply convert the CSI to vid? I checked Rasperry Pi prices and fuck me they're $250+.

Appreciate any advice at all
--- 2591910
>>2591775
Those FPV goggles receive analogue video, so you need to either (a) convert the CSI to composite video, (b) bypass the analogue stage and somehow convert the CSI video directly to something the display will take, or (c) repurpose the existing IC to take MIPI or some easily converted digital format.

(a): While there's plenty of options for converting composite video to CSI, I can't find anything for going the other way around. Best bet for this would be to find a video DAC and use a sufficiently fast microcontroller or FPGA or whatever to convert to the DAC's format (e.g. RGB). See also:
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/635317/sn65lvds315-mipi-to-rgb
That RGB output format might be what the LCD flex cable takes, idk.

(b): It may well be possible to get a display (pre?)driver specifically for your LCD that will take a MIPI-CSI format, but I've no idea how to look for it. You'd need to know the model number of the LCD. If the flex cable coming out just happens to have the same CSI format then it's even easier but I highly doubt that.

(c): You could check out the datasheet of the main video converter/driver chip on there to see if it will take different input formats, but chances are it's a chip that only takes analogue video and converts it to an intermediate data format that goes via the flex cable to the row/column driver built into the LCD panel.

(d): Just buy a composite video camera. They're like $15.
--- 2592079
I salvaged an at89c2051 from a device a while ago, How can I reprogram it? From what I can find, I need Keil? Is it as simple as wiring it up correctly with a crystal and connecting it with a programmer adapter? Would a UART or ISP work?
--- 2592126
>>2588466 (OP)
After figuring out servo motors just wouldn’t cut it, I bought a couple brushless stepper motors and A4988 motor drivers. I want to use one of the motors (& a driver) with an arduino uno or nano. My question is what is the best way to power this project without a usb cable connected to a computer? I’m a complete beginner and for all my projects so far I’ve just used 9 volt batteries connected to a slide switch to power a nano.
--- 2592130
>>2592126
AAs
--- 2592131
>>2592130
and get the rechargeable kind, even though they're only 1.3v they can dump current out much faster thanks to their better impulse response, that's what you want for steppers.
--- 2592135
>>2592131
Well I actually want to make it turn slowly for this project
--- 2592137
>>2592135
That is irrelevant, you control that with your arduino.
--- 2592277
>>2592126
how portable does this thing need to be?
how whats the nominal voltage for the motors?
how long does it need to last?
--- 2592355
>>2592079
you can use, almost anything to program avrs. though id use microchip studio and an atmel ice or something to do a full chip erase. it is likely, depending on where you got this mcu from, that the lock/security bit/fuse is set and you wont be able to program it until a full chip erase.
--- 2592371
I'm working on making an FM radio for my motorcycle.
I want it to connect wirelessly to my SENA comms system which is connected to my phone.
So I plan to connect the audio out of the FM module to a BT transmitter, which connects to my phone as an audio input.
I've tried this blue BT transmitter board from aliexpress but it doesnt seem to want to conenct to anything that isnt a bluetooth speaker.
My next option is programming an ESP32 to do the job but the A2DP libraries seem to focus on transmitting to a bluetooth speaker, just like the transmitter board.
Is my project even feasible?
I cant find anybody doing something similar online, and I'm not even sure if android can accept audio in from BT.
--- 2592408
>>2592371
>module
>library
this is your problem. when youre doing something unpopular or out of spec you need to build it all yourself. because """most""" modules and libraries are general purpose prototyping. and whats the most general purpose form of bluetooth audio? a bluetooth speaker. youre gonna wanna get a nrf52 mcu and use the bare bluetooth system to configure it as an audio transmitter. then hope your phone can take it like that, otherwise youll need to reverse engineer the SENA comms and add in the bluetooth audio input functionality. good luck
--- 2592468
>>2592355
The AT89 series isn't AVR though, it's an 8051 derivative, in most cases (this one included) with internal program flash and ram. The AT90 series is the first of the AVRs. While some AT89 series can be programmed via a simple USBasp due to sharing the same SPI+reset programming system, the AT89C subseries requires high-voltage programming.
You can make a dedicated programmer for it that switches 12V to the reset pin like this guy:
https://www.instructables.com/Introduction-to-8051-Programming-With-AT89C2051-gu/
He uses software designed specifically for flashing code onto AT89 series chips, not sure how good it is. There isn't support for it in AVRdude or otherwise in the Arduino IDE.

The official option is to get an Atmel programmer that says it will program AT89C series (Dragon?), and use Atmel Studio. MPlabX might work. A PicKit or other Microchip specific programmer won't do the trick.

>>2592371
Dedicated bluetooth 5.x receiver boards are reasonably cheap and common, and a lot easier than buying an NRF. Somewhat less compact, but judging by that amplifier board you don't really care about that.
--- 2592500
is it possible to find out which COM port the Arduino uses without opening up Arduino IDE?
--- 2592509
>>2592500
There's a command you can type into a your shell of choice to list usb and/or serial devices, though the command itself depends on operating system
--- 2592511
Hey fellas noob needing some guidance. Looking to build a synthesizer as a learning experience / improve self taught PCB design skills. Have made some stuff with Teensy 4.1 but looking to move out of Arduino ecosystem. 
STM32F7x6 - Looks like a good pick to me, with I2S and built in graphics accelerator. Price seems pretty good, has cheap discovery board available and should be powerful enough for a few (4+) wavetable voices?
Any tips / better chips to look at? Non-Arduino toolchain advice?
--- 2592528
>>2592511
The DSP capabilities of the higher series STM32s is pretty appealing for audio use. Though stock has been pretty patchy over the last few years.

Personally I looked into using an ESP32 for audio processing purposes, the 520k of RAM made them quite appealing. I figured I could more or less cram 5 STFT windows into the RAM, while the 160MHz with I2S DSP should be more than fast enough for brute-forcing those STFTs. They're also dual-core, though using that second core as anything other than a wireless modem is a bit of a stinker. Could use three of them together for cheaper than one of those higher-end STM32s, and the external flash memory means you can expand your wave storage pretty naturally, same for the SD card capability.

As for toolchains, there's a few STM32 specific ones, read this for more info:
https://stm32-base.org/guides/getting-started.html
A more generic idea is to use VScode and Platformio, which can be used for a large variety of different microcontroller platforms
A more autistic idea is to use GCC and some sort of programming tool like texane's stlink
--- 2592546
Okay the controller board in my 3d printer is an atmega2560 and a problem I keep having is that the controller board is 50/50 on successfully restarting or get stuck, and have to completely cut power.

I heard about watch dogs timer causing this, went through klipper's source code, which is the firmware I have, and they already have this implemented.

Question is, is there an alternative way of rebooting the board I could possibly due by manipulating GPIO pins or more reliable way?

BTW you can specify a restart method and they have one called "arduino" but that appears to not matter.
--- 2592549
>>2592546
>is there an alternative way of rebooting the board I could possibly due by manipulating GPIO pins or more reliable way?
pull the reset pin low, check the datasheet to find which one it is
--- 2592550
>>2592546
It would probably be pretty easy to detect the stuck condition with a 555 timer circuit or two and use that signal to hit the reset line. Or even just have a manual button.
But personally I'd want to fix the problem at its root. It may be a hardware problem like dodgy power rails or the reset voltage not being stable enough, or SD card initialising failing. Or maybe it's a software problem. More research, more experimentation.
--- 2592575
>>2592528
texane stlink is based stm32 programming. all this whoop-de-do shit in vscode is bloated as fuck and the stm32ide is an absolute dogs breakfast eclipse based ide
--- 2592576
>>2592500
device manager brah
--- 2592684
WTF am I doing wrong?

I'm trying to read the temp with a 18B20. Pic rel is the circuit on my Uno.
This is my code : https://paste.centos.org/view/514f1c4f All I get is "Searching... DONE". oneWire.search() is always returning false.

I tried the same code+wiring with a Nano first. It seems to output 3.3v as high so I moved to the Uno, which has 4.9v as high.

The 18B20 came from eBay, so it might be fake, but I also tried the same setup with a DS2401+ from Digikey and it also found nothing.
--- 2592712
>>2592684
Is that I2C? Are there pull-up resistors in there?
--- 2592714
>>2592712
1-wire. Does it need a pullup?
--- 2592716
>>2592712
FUCK ME. Yes I need a pullup. AAAUGH
--- 2592769
What is a good source for small FPGA dev boards? I just want something that is supported by yosys, and which doesn't need a separate programmer. But I'm not even getting this far. Everything is expensive and not available on digikey. Even amazon doesn't show the usual cheap chink fake shit as it does with MCUs.
--- 2592807
>>2592549
>>2592550

Thanks for the reply, I may end up saying fuck it, and store the printer away for the time being , any changes I make I ahve to restart the controller board, since its not a full power cycle theres the chance of getting stuck in boot. 

Even if I do a full power cycle, wonky shit happens, the saved files don't get updated and sometimes it makes changes ot the file like it had variables commented out that I never commented out, AFAIK didn't have a old config file for it to revert to.
--- 2592873
Is there an off-the-shelf microcontroller that I can use to make my own custom keyboard/interface device? USB compatibility would be required of course, no bluetooth though.
I mainly want to experiment with alternative keyboard layouts that have more/custom keys for programming and also one with chorded keys to minimize space on a UMPC.
--- 2592879
>>2592873
teensy 3.2/.6. all you gotta do is multiplex the keys
--- 2592896
>>2592873
> fake usb keyboard
How fast can you make a usb keyboard “type” into something like notepad? You could use it to hold data and documents, and not worry that your usb stick was formatted with, say, mac journaled, and unrecognized on windows. Just plug it into anything and upload it into notepad, write, or textedit. Eat your heart out Mavis Beacon!
--- 2593033
>>2592873
The RP2040 is a good and cheap option, there's even keyboard firmware already out there if you don't want to completely roll your own from scratch
--- 2593280
>>2592549
>>2592550
>>2592807

Update, found this on klipper github, sinceI am using an orange pi, there was minor changes, but so far it definitely looks like this fixes my problem.

https://github.com/Klipper3d/klipper/issues/1599#issuecomment-489312393
--- 2593577
Looking for AES encryption chips, but can't google anything meaningful. Any Mouser/digikey links?
--- 2593618
>>2593577
Just use a small micro controller? Some even have dedicated AES IP blocks.
--- 2593708
>>2593618
>use a small micro controller
Examples? I need to handle a video stream, hence I need hardware encryption.
--- 2593851
Pulling my hair out. Trying to interface Win10 machine to Arduino Nano across USB cable. Right now, just to send a short message from Win10-->Arduino. It just doesn't work. 

> Win10: Using Python, serial toolbox, sending to COM6 at 9600 baud. Half the time I get "Access Denied," half the time it runs but sends nothing. 

> Arduino: Monitoring COM6 serial port at 9600 baud, with LCD Keypad Shield attached, programmed to echo what it sees on the serial channel. Something is hitting the serial port but appears to be trash...I think it's just Windows poking it. 

I can't tell if something else is sitting on COM6 (have tried moving to COM2, no change). Nothing I'm seeing in tutorials deals w. this, it just doesn't want to work. What am I missing?
--- 2593875
>>2593851
I've never had issues connecting, I only have problems with the Arduino IDE and Python interpreting everything as ASCII when I just want to send numbers.

You do the typical "wait for serial connection" shit in the MCU code, right? For my python codes I set the timeout time to like 10s, and start the python code just before activating the serial from the MCU (e.g. hitting reset, plugging it in, or otherwise starting a data stream). Having the python serial timeout set much higher, or have it loop and keep retrying might be the way to go.
--- 2593915
>>2593875
>wait for serial connection
No, did not. I start the Arduino, then start the Python code, which has a very short timeout, like 0.1s. 
I’ll change the timeout and try reversing the order.
--- 2593923
>>2593875
>>2593915
Actually I have tried that; if I run Python code before connecting the Arduino, the code kicks back an error, basically saying it can't find the COM port. 
If I plug it in first, then run code, the code will run a couple times and complete, then start throwing Access Denied errors. In meantime the Arduino starts throwing trash on the display.
--- 2593927
>>2593708
> secret videos
What are you trying to hide?

Encryption has a cost… self encrypting drives store at half the rate of unencrypted.

Why does it have to be AES? Are you worried about foreign governments looking through you tiktok complations?

You can do a simple XOR with a long-ish, changing key that will stymie any attacker you will ever come across.
--- 2593941
>>2593927
>Encryption has a cost… self encrypting drives store at half the rate of unencrypted.
So much bullshit, but this is the worst one, because it's factually wrong.
--- 2593981
>>2593927
I said nothing about storage, I said video stream. AES is preferable because it's common and there are "hardware encryption" available. Yet I can't find chips.
--- 2593987
>>2593923
sounds like youre not correctly setting up the software on either end. on any mcu receiving data from usb/uart, you need to check whether theres bytes in the buffer before you "read" them. usually this done with some sort of hardware flag to let you know. the mcu doesnt care whether is actually connected or not in the end, it will just say no bytes received. as for the pc software side, i would personally make it more dynamic, being that you open the python script and its a prompt asking for the comport number to connect to, and it just waits. this way you can plug the tarduino in and verify what port its on, then type in the number of the port to open. it wont always be the same. are you sure its com6/2? are you sure that the ftdi chip/mcu usb controller is recognised by the system?
--- 2594012
>>2593987
>are you sure its com6/2? 
Yes. The Arduino IDE can connect and send software. COM port is set within Win10 device manager and is consistent.
> are you sure that the ftdi chip/mcu usb controller is recognised by the system?
It is by the IDE, but I'm wondering if the pyserial module is. Reading documentation on pyserial now I may just start from command line and conduct debugging from there. 

The code is literally Hello World, following example from online that are all basically the same. 

> Python
import serial

# Open serial connection
ser = serial.Serial('COM6', 9600, timeout=10) 

# Send message to Arduino
message = "Hello world!"
ser.write(message.encode(('ascii')))

# Close serial connection
print ('Done.')
ser.close()
--- 2594014
>>2594012

> Arduino
#include <LiquidCrystal.h>
//LCD pin to Arduino
const int pin_RS = 8; 
const int pin_EN = 9; 
const int pin_d4 = 4; 
const int pin_d5 = 5; 
const int pin_d6 = 6; 
const int pin_d7 = 7; 
const int pin_BL = 10; 
LiquidCrystal lcd( pin_RS, pin_EN, pin_d4, pin_d5, pin_d6, pin_d7);
void setup() {
 lcd.begin(16, 2);
 lcd.setCursor(0,0);
 lcd.print("Waiting...");
 Serial.begin(9600);
}
void loop() {
 if (Serial.available() > 0) {
 String message = Serial.readString();
 lcd.clear();
 lcd.setCursor(0,0);
 lcd.print("Received: ");
 lcd.setCursor(0,1);
 lcd.print(message);
 }
}
--- 2594020
>>2593927
>>2593941
> self-encrypting drives have a performance penalty is bullshit?
I posted that they do, I used to work for a company that manufactures them. At the time (like 1/2nd gen), it cut the performance in half. However, I can’t find any evidence that it’s still true (for years). What we did initially is take regular drives and “bolt on” encryption into the underpowered mcu, hence the performance loss. Now, it’s designed in.

So yeah, nowadays, that’s a bullshit starement.
--- 2594147
>>2594012
in the python script youre not going serial.open(ser) first - this your problem. it also catces a serial exception if the port isnt available
>>2594014
reading a string is kinda...meh, you should read byte by byte until your prefined escape character appears. i usually use '\n'
--- 2594260
>>2594147
> serial.open(ser)
AttributeError: module 'serial' has no attribute 'open'
> string is kinda...meh
Agree, but just trying to get them to talk, at all, now. Eventually I want Win10 to move sets of servos driven by the Arduino.

Anyway it's working now... running from Python from command line in terminal vs. software package. 
I'm new to Python and have been using Thonny as IDE, in addition to having Python installed on WIn10 machine. Thonny doesn't work. Python running from terminal is. Pls suggest a better IDE, or perhaps should just use Notepad++ like usual. 
> TLDR I'm retarded.
Thanks for the help.
--- 2594315
>>2594260
>serial.open
oops i waa thinking of the serial.is_open flag nvm

anyway, what the fuck is Thonny. no wonder your shit isnt working. why not just use the shitty python terminal and IDLE. then worry about different ides. i personally use the python extension in vscode and a powershell window. surprisingly smooth once set up properly
--- 2594357
>>2588906
>You also need to use a dedicated RISC-V programmer for those
bullshit. GD32V(F103) has a USB bootloader in ROM
--- 2594582
>receive hid packets with mcu
>sniff contents, edit contents and forward/send to another usb port
>device connected to the 'another usb port' sees it as just a normal hid device
is this possible?
--- 2594584
>>2594582
Are you talking about a keylogger that a keyboard plugs into then forwards it to the host (PC)?
--- 2594596
>>2594584
I meant more like a kvm switch that has its own bluetooth rxtx and forwards all the connected hid stuff over usb to a computer.
--- 2594625
>>2594315
> vscode
Who the hell thought it was a good idea to use a massive, bloated browser to make an even more massive, bloated local file editor? I tried vscode, and you press a key and it appears a bit later.
 Try and pull down an option menu, and it’s blank until a minute later it populates after the fact when I hoover over it long enough. You guys tolerate that? Could be worse though… could be written in python.
--- 2594629
>>2594625
All of the present day code editors are written in javascript that's why they are so slow.
--- 2594697
>>2594625
works at lightning speed for me. must be a skill issue on your end
--- 2594792
>>2594625
>>2594697
> skill issue
Yes, too much skill. I can’t tolerate extreme UI lag. I’m probably good pro gamer material. Also, I should get Z rated tires for my nissan cube.
--- 2594833
>>2594582
Very possible
To simplify life, get an MCU with two USB interfaces, at least one of them USB-OTG
--- 2594876
>>2594625
Just spend a lot of money on a beefy machine, so your bloated microsoft app doesn't lag doing tasks that computers could do in the 90s faster.
--- 2594944
so i heard linear actuator vibratiors are better than the old spinning motor ones and i bought some but i realized too late i fucked up.
with motor vibrators it's just 3volts of DC and they vibrate, but the LRA ones not only need AC but also specific resonant frequency in order to work properly.
Do you think i can use something like esp32 and rapidly change PWM in order to simulate a sine wave of a certain frequency? also how do i find the resonant frequency?
--- 2594946
>>2594944
fuck, that won't work, i just realized pwm will just simulate half of the sine i would need some shit like hbridge which means 4 fets per every lra ;_;
--- 2594955
>>2594946
>pwm will just simulate half of the sine

doont need no stinkin' h-bridge.
a simple cap, like they use on the output stage of power amps, will convert the signal to AC by removing the DC bias.
--- 2594981
>>2594955
so you feed pwm into VIn and it pumps out sine?
--- 2594994
>>2594981
>it pumps out sine?

not sine, but some rounded off version of a square. 
the bigger the cap, the more square.
but it's AC, which is probably sufficient.
i.e. the electrons flow in 2 directions, not 1.
--- 2595107
>>2594981
Look at class D output filters.
It literally turns pwm into a sine somehow.
I’m not a filter guy, but it looks like a cap and an inductor is basically black magic.
--- 2595144
>>2593851
>received:
DONTTHINKITDONTSAYITDONTTHINKITDONTSAYIT
--- 2595176
Can I connect a 5V relay module with optocoupler directly to the gpio of the esp32c3 dev board? GPIO does 3.3V and <40mA. While I can find data sheets for the mechanical relay on the HW803A or other relay boards, I don't know what the optocoupler is and how much V, mA it needs.
--- 2595184
>>2595176
Well, find the optocoupler datasheet. If you can't find it, blame yourself on wasting money on trash, and try what works. Also, is that mains power? Don't fry yourself.
--- 2595248
Not perfect but here it is 
>inside is too crowded, closing the case was a bit hard. should have made shorter cables and properly design the circuit
>on off switch too big
>the case has heat marks on surface
software wise i will need a main menu to list nes/gb roms on sd card. and I will need to overclock it for nes games, it is a bit slow
--- 2595264
>>2595176
optocoupler is transistor but internally uses light to toggle, so circuits are completely separated. check the octocoupler's data sheet as other anon suggested. It is this thing. 

I doubt it would require full 5v on its input pin so 3.3v gpio is probably fine. Worst case you can use another transistor to supply 5v or gnd using your 5v output from mc. just put resistors on io pin so you don't fry it.
--- 2595278
>>2595264
Actually optocoupler probably won't give you the answer. Try it and if you are seeing 5v on optocoupler when it is toggles on, it is probably fine
--- 2595290
>>2595184
Thanks. Mains shouldn't be an issue: I will use a usb-c charger with one port to power the dev board and another port to supply 12V to the solenoid via a usb pd decoy (probably IP2721_MAX12). This design has one or two cables from the charger going to three boards stuck together. Maybe it can be done with less.
Vbus only goes between 5 and 12V through the SEL pin of IP2721_MAX12 (20V for IP2721): otherwise I could do it without the relay: Vconn is 5V, so connecting the solenoid between Vconn and Vbus might work if Vconn maintains its voltage when the current is opposite the usual. The relay option seems better.
If I power the dev board with Vconn, also used by the pd decoy, I could get rid of one cable.
--- 2595337
>>2595290
> pd decoy
I had to look this up.
We’ve finally reached a point where the wall wart power is encrypted and DRMed so you can’t just use it, you’ve got to negotiate with the wall wart a licensed chipset.
--- 2595410
>>2595176
As other anons say, read the datasheet. I suspect you’ll find that the sinking current of the phototransistor can’t be much higher than the current going through the LED, so if it’s not enough you may need another transistor.
What model relay and opto do you plan to use?

>>2595337
It’s not about money grubbing, it’s about not sending 20V into your phone.
We’re also at a point where it’s easier for an average consumer to transfer data between computers using a USB A-to-A cable than it is to use a network cable.
--- 2595418
>>2595264
>I doubt it would require full 5v on its input pin so 3.3v gpio is probably fine

the input side of an optocoupler is an infrared LED.
so you only need about 1.5V to turn it on.
and a resistor to limit the current to 20mA.
but 20 is a max; 5-10 mA, should work fine.
--- 2595455
How can I demo WindRiver Simcs for ARM? Intel has a free download but it seems impossible to try for ARM platform. Licensing is taking a long time and I need to start working asap to meet my deadline. It is for academic research and won't be used for profit.
--- 2595527
>>2595455
why dont you just use a FOSS RTOS, like Zephyr
--- 2595546
>>2595176
>>2595410
Oh I kinda misread your post, the optocoupler and relay and resistors are already on the board. And it looks like there's already an extra transistor on there. No clue why they're using an optocoupler to turn on a relay considering the relay coil is still powered with respect to the same ground rail, and the relay itself provides isolation. Might have something to do with the jumper, idk.
--- 2595548
>>2594955
Anon you liar that's merely an integrator circuit
--- 2595570
>>2595410
> sending 20v into phone
Ok,
1) use a resistor to detect like real usb and vga did. This sets a bad precedent. I hope FTDI doesn’t get into this business and brick my “active” cable. “active” cables are provably a scam.
2) go right to 48v like the smart people who did PoE. It’s not like dc/dc converters aren’t everywhere. A graphics card is like a GPU and 20 dc/dc converters delivering 100A at 1.1 and 3.3v.

Oh, better yet, make the motherfucking batteries removable again, so I can put one in a charger of whatever capacity like every other device that isn’t used for monitoring my whereabouts without being able to truly turn it off. Then we wouldn’t need this horseshit to begin with.
--- 2595574
>>2595455
Using a real-time os won’t guarantee that you’ll meed your academic deadline. Other deadlines, yes.

I find a lot if people who think they need a rtos don’t really need one.
--- 2595595
How should I pick the right microcontroller for a given job when I have little experience? Does it make sense to order a bunch of atmegas and start with the lowest speced one and then move up once I realize I need more memory or higher clock speed? Or do you usually calculate or estimate those things before you get started with a project? If you have any good comparisons of the most commonly used avr microcontrollers that help with the decision, please share them
--- 2595596
>>2595570
>use a resistor to detect like real usb and vga did
A naive thought would be that it's too failure prone. A single solder joint fails on either end of a vibration-prone connector? Phone = pocket bomb.
But looking more carefully, proper window comparators shouldn't allow a connector failure to cause an overvoltage situation, just an undervoltage one. Only if you have a shitty joint or semiconductor that somehow turns what should be a 0Ω or hi-Z into a moderate resistance do you get it. Though water ingress seems to be a possible way of getting that. Two resistors right next to one another with distinctly different values (100k + 1k, 200k + 2k, etc.) and sufficiently narrow comparator thresholds would be basically failsafe against water ingress. So would sending a simple signal like a square wave frequency between 0.9 and 1.1kHz.
It does use more pins than USB 3.0 though.

Personally I'd really like it if they somehow exposed the SMPS feedback loop so the slave could use whatever resistor network to set an arbitrary output. Should be safe with those dual resistors + comparators.

Anyhow if a 2c chip from aliexpress can do the communication and let me use one power supply for a variety of different voltages then that is pretty convenient for the project side, though it does overcomplicate the power supply side.

>go right to 48v like the smart people who did PoE
Isn't it more commonly like 52V? Anyhow I agree with you on that one, if every device has a buck converter set to a high input voltage anyhow then you're golden, but it does overcomplicate the device side, especially for something that should be small and cheap (e.g. a little microcontroller project).

Isn't ethernet already the ideal standard for both power delivery and data? Thinkpad's mini ethernet port looks pretty neat. Also I hear about ethernet over (micro) HDMI, though I doubt it's designed with PoE in mind.
Well fuck thin phones anyhow, I'd buy a phone with an 8P8C socket on it.
--- 2595598
>>2595595
It's pretty easy to get a rough idea of what kind of MCU a project will need:
RAM use is fairly easy to calculate for things like signal processing and display driving. You basically just go through the large contributors to the data (e.g. your framebuffer) and see how many bytes it takes up.
CPU frequency is somewhat easy to calculate if you have a certain speed at which you need to process a known size of data or a certain latency to get below. You do need to have some understanding of the assembly to do this, in order to guess how many instructions it will take, but that's not too hard. Direct port manipulation saves a lot of time.
Peripherals are really easy to get a handle on, like whether you need I2C, I2S, ADCs, ethernet, CAN, DACs, native USB, USB host, wifi, etc, and the number of simultaneously usable instances of any of those. Same for number of I/O pins. There are ways of expanding functionality to a given MCU, and this is often done with expansion boards/chips for ethernet, wifi, RS232, and bluetooth. I've also seen expandable I/O chips if you need more pins, but these extra pins won't be nearly as fast as normal ones.
Internal functionality is also reasonably easy to understand. Specific instruction subsets like hardware multiplication, hardware division, a floating point unit, vector calculation capability, internal CRC, and cryptographic capabilities. None of these are 100% necessary, but are a lot faster than brute-forcing with other instructions. There's also core features like Direct Memory Access, which is vital if you're piping large amounts of data through the MCU.

That said, it's still nice to have a variety of general use MCUs. I'd personally recommend:
Extra cheap 8-bit micros with >1k RAM and 8-14 pins (e.g. ATtiny214)
Fairly cheap 8/16-bit micros with >18k RAM and 28-48 pins (e.g. ATmega3208)
Somewhat powerful 32-bit micros with >100k RAM and >100MHz and DMA (e.g. RP2040)
Get (or make) dev-boards for all your general use micros.
--- 2595605
>>2595595
>>2595598
Also here's a nice image specifically comparing AVRs, though it's missing a couple.
Note that there's a disparity between the AVR-ISP programmed AVRs of the old days (tiny85, mega328P, etc.) and the UPDI programmed AVRs of the newer generation (e.g. the two I listed). You should be using some sort of ICSP for programming because bootloaders are a hack, and while there's an easily available programmer for the old ones (USBasp or an arduino-as-ISP) you have to make your own for UPDI (USB to TTL serial dongle + resistor + diode). There's support for this programming method in AVRdude and Arduino, though if you're more serious you'd use an Atmel ICE or equivalent, since that lets you use Atmel Studio or MPLABX. Programming bare metal and using avr-gcc and AVRdude is doable with the newer micros, but you have to extract some of the core files from MPLABX. In addition, I ran into issues getting it to compile code that stores values in progmem, since these newer AVRs arrange their memory addresses in a slightly different way. The same code worked fine from the Arduino IDE, so no clue what was going on. Maybe Arduino from the command line is the way to go.

So you might be thinking that buying old AVRs is the way to go, but you'd also be wrong. They're both more expensive and have worse specs, and they're often out of stock because blinkies buy them all up. Might be better now, but I wouldn't trust them to keep making those old AVRs anyhow.
So here the greybeards just keep using the same 40 year old industry standard PICs, the blinkies will keep buying chinky arduino boards and soldering them directly into projects without ever noticing the chips are fake, the chinks use ESP8266s and ESP32s since they're unreasonably cheap and get spied on by uncle Xi through their router, the scalpers use their stash of STM32s that they couldn't sell for $50 each, and everyone that would have bought a low-end STM32 moved onto the RP2040.
Chads use the Parallax Propellor
--- 2595622
>>2595337
Innovative idea: payment for power through the PD protocol.
--- 2595624
>>2595598
>>2595605
Thank you, that's exactly the kind of advice I was looking for!
--- 2595656
>>2595622
Bongs would love that.
--- 2595662
>>2595656
>smartmeters
I have to allow them to install one in my house too, I hate it.
--- 2595746
>>2595546
The mechanical relay coil itself needs 0.3W, to much for gpio. The optocoupler need less see >>2595418
Pic related HW-532 (optocoupler-mosfet) is smaller and slightly cheaper than the relay board. It looks like it'll work and maybe consumes less power than the relay. But they say I need a flyback diode which seems to be more optional for the mechanical relay.
--- 2595756
>>2595656
Is that one of those coin operated meters like from mr bean
--- 2595758
>>2595574
Underappreciated post
--- 2595761
>>2595410
I hope you mean "c-to-c"
--- 2595805
>>2595596
> 2¢ chip
How much for the resistor then? I don’t have any of these chips, I’d have to get them shipped, put them on carrier boards probably, and then test it against all the different usb c implementations, find out they were fake, re-badged lightning chip knock-offs that apple banned by blacklisting the serial number in the latest update.

> 48v
Telecom standard. It’s probably the highest universally safe voltage (around the world) before it’s considered “high voltage” somewhere. A limit that keeps moving down. It used to be around 60, and back in the day, 90 was considered kind of ok because of neon bulbs… also a mainframe can’t easily fall into you bathtub.

> 20v
Why 20v, not 24?
Re-buy new everything with crazy new standards.
Oh, and they are putting DRM into USB-C, but they will call it “authenticating” the cable. Vendors weren’t making enough money with the 40x mark-up on cables.

Like windows Vista, I’m going to sit this round of USB out. I’m sure there will be another one along shortly.
--- 2595806
>>2595574
I'm not using an RTOS I just want to simulate the Cortex-M4. I'm very inexperienced in this area but I have a remote collaborator who needs this. If I download the Intel Simics version, do you know if it'll support the Cortex M4?
--- 2595824
>>2595570
>>2595805
>2) go right to 48v like the smart people who did PoE
Interesting. So USB-C couldn't go above 48V either? PD is a pretty complicated protocol. I'Ve dealt with it on a software level (on top of a popular PHY chip). You need to handle multiple types of messages, check CRCs, pick the wanted voltage out of a list, handle timeouts... It gets even more complicated if you don't just want to be a source or a sink (laptops will want to be able to do both), you can do dynamic role changes. The USB PD 3.1 spec is 747 pages long. Could they have solved this much simpler?
--- 2595873
>>2595805
>Telecom standard. It’s probably the highest universally safe voltage (around the world) before it’s considered “high voltage” somewhere.
50V is the highest safe voltage for DC.
DC will arc like a bitch above that. AC is safe at higher voltages because it goes to zero all the time, breaking the arc.
https://www.youtube.com/watch?v=Zez2r1RPpWY [Embed]
--- 2595898
>>2595824
>Could they have solved this much simpler?
The problem is that USB was a data protocol. They then decided to use it for power distribution. Then they added a protocol for negotiating power distribution. And of course anything designed by a committee is going to be at least 4 times more complicated.
--- 2595906
>>2595746
I'd use a freewheel diode regardless.

>>2595761
No, A to A.

>>2595805
>How much for the resistor then?
Also a trivial cost.
>all the different usb c implementations
I think it's just USB PD, and while there are multiple versions of it, they should all be backwards compatible. Like if you have a chip that only supports going up to 12V it's not going to fry anything with a PSU that can go up to 20V.
>Telecom standard
Well it's a range, and people often go for the upper side when making a PSU. Looks like there's some negotiation there too.

>Why 20v, not 24?
Because it's the bare minimum to allow for laptop charging at a sensible current. There is a ~48VDC USB PD standard in the works though, through the same C connector.
>they will call it “authenticating” the cable
Is there any other way of stopping chinky cables being used to charge a laptop before combusting? If it was just a matter of setting current capability with a resistor then the chinks would fake it for sure. I think this is a fundamental flaw with the USB C power delivery standard.

>I’m sure there will be another one along shortly
I'm not so sure about that, I think they'll just tack more and more functionality onto the C connector for the next few decades. I agree that it's the ideal port for both data and power into somsething compact like a cell phone. But if it doesn't need to be compact, then use USB3B or ethernet for data or a barrel jack for power. If it does need to be compact, we still have barrel jacks for that.

>>2595898
I think the idea is by using the existing data pins to send more information, you don't need to include extra pins for power negotiation, and can have both high speed data transfer AND high power charging at the same time. Especially for those laptop charger+dock stations. It assumes that the power receiver already has a fully flexible USB communication implementation, so it's just a software task to implement PD.
--- 2595907
>>2595898
But USB-C was a redesign with power distribution already in mind.
--- 2595966
>>2595907
>redesign
It was an insane layer of complexity added on top of the existing standard.
--- 2595971
>>2595966
New incompatible connector, new wires... USB 2 had only one differential pair of data lines, USB 3 added two more. They could have done it.
--- 2596046
>>2595906
> I think they'll just tack more and more functionality onto the C connector
That’s what microsoft said about Windows 10. Look what happened. Entities primarily engaged in marketing (e.g. the usb c cartel) follow the same trends they read about in CEO magazine.

Charging mobile devices will be 100% qi charging soon enough, just like the removal of the headphone jack. They’re wasting their time, my time, and they’re too late.

I live in the stone age, and i haven’t used a tethered usb or lightning connection to transfer anything in years.

Phones will be these hermetically sealed corningware glass suppository-like devices with no physical access to anything.

Imagine if these assclowns thought they could get away with tampering with the north american 120v 60hz AC standard. This is where chinese Cu clad Al wire is a real and serious problem.

Don’t give me that “it’s for your protection” line with usb c.
--- 2596057
>>2595907
> designed with power distribution in mind
let’s not use words like “designed” and “mind” 
This was grown like an full open anonymous check-in github project.

If they were concerned about power distribution (and why would they be, it’s not really their forte, nor business) they would have started with a sensible physical connector like the magsafe. Don’t get me wrong, I hate apple, but even my hot water kettle has a “magsafe” connector on it.

It’s pretty clear they just cobbled some shit together as some kind of response to thunderbolt and lightning connectors released it as beta, and vendors will continue arguing for years on how and what to implement.

In the meantime products will only assume they can get 5v at 500mA out of it for the next decade because they already don’t work well with each other.
--- 2596102
>>2596046
You forgot your meds.
--- 2596106
>>2595906
Lol, you cannot connect A to A between two PCs, there are no female ports or polarity detection or host negotiation. A (hypothetical) to a cable shorts pairs together, it's no different from a male to male extension cord, which is why you can't go out and buy either...C has more pins anyway so there'd be no advantage. 

You are /g/ huh.
--- 2596132
>>2596106
The power rails being shorted together scared me too, but with the right software and its drivers, the pairs being connected is hardly an issue. Both D+ and D- are bidirectional, after all. And whatever talks first can then send information to the other and tell it to send data.
I'm just the guy at the tech shop confused that it's what customers buy and use, I've never done it myself.
--- 2596185
>>2596106
>you cannot connect A to A between two PCs
This is trivially easy. I remember reading an article about this in Dr Dobb's back when USB was the New Thing. But Anon is talking about C to C communication.
--- 2596217
>>2596185
No I was talking about A to A communication back here: >>2595410
>We’re also at a point where it’s easier for an average consumer to transfer data between computers using a USB A-to-A cable than it is to use a network cable.

Which I guess got mixed up with talking about the C-to-C comms that goes on between a USB power source and power consumer.
--- 2596262
>>2596185
>This is trivially easy. I remember reading an article about this in Dr Dobb's back when USB was the New Thing
OK, how do you do it?
--- 2596405
>>2596262
You mean a null modem usb cable?

We used to need those on ethernet, too, but now most of them can autodetect. For like 10 years now.

Yet another way USB is the worst at everything.

Most likely it was put forth by euro-sino-russian plants in major companies to destroy the US.

Firewire was better in every way too. Bluetooth was invented specifically to replace USB for USB’s original intended purpose. But, again, hipsters hate cords, so they won’t use usb, and true gamers went back to PS2, because even that was better.

It’s literally the worst at everything. You need like a minimum 25MHz μC to make it work, and it’s a bitch to program on the software side.

Oh, and I used to write device drivers on windows for USB devices… thats a whole rant in and of itself, and we’d pay like $30-350 k to get them “certified”… the whole thing is a big fucking scam.
FTDI… please.
--- 2596413
>>2596405
>10 years
Try 20, never in my life I had to care about the type of ethernet cable. Although Ethernet usually implies a star topology, it's truly point-to-point, and not one way host/function like USB. I still wouldn't know how to connect two computers with an USB cable, unless I out some sort of proxy device between them.
>Most likely it was put forth by euro-sino-russian plants in major companies to destroy the US.
Uh.... ok...
>Bluetooth was invented specifically to replace USB
Jesus Christ how horrifying. I hate anything wireless. It's ALWAYS insecure or unreliable.
>Oh, and I used to write device drivers on windows for USB devices… thats a whole rant in and of itself, and we’d pay like $30-350 k to get them “certified”… the whole thing is a big fucking scam.
My condolences. We just used libusb, most code was portable across win/linux/mac, made up our own vendor ID, and didn't pay a fucking cent to anyone.
--- 2596428
Can I reuse same memory location for different objects that are in global scope? I am using gcc (platformio and building for rp2040)

I have structs in different header files and global instances of those structs. 

[code]
// MyData1.h
struct MyData1
{

} myData1;
// and here we have functions that uses global myData1 object

// MyData2.h
struct MyData2
{

} myData2;
[/code]

And I want to reuse same memory location for them because only one of them will be used at the same time. Tried something like


[code]
// MyData1.h
struct MyData1
{

};
extern MyData1 myData1;

// MyData2.h
struct MyData2
{

};
extern MyData2 myData2;
[/code]

and later in main.cpp I want something like

[code]
union
{
MyData1 myData1;
MyData2 myData2;
};
[/code]

But that gives me "anonymous union at global or namespace scope must be declared staticC/C++(365)"

Tried 

[code]
namespace {
 static union { 
 MyData1 myData1;
 MyData2 myData2;
 };
}
[/code]
Then I am getting myData1 redecleration errors


Is there a simpler way of doing this? I am thinking of 

[code]
main.cpp
char myGlobalBuff[...];

MyData1.h
#define myData1 (struct MyData1&)(*myGlobalBuff)
[/code]

But I don't want to resize myGlobalBuff everytime I change sizes of my structs
--- 2596433
>>2596428
uh, this board does not allow code tags, how nice
--- 2596434
>>2596428
Unions are ideal for what you're trying to do. The compiler complains because it wants the union to have a name (only unions nested in structs can be without a name). Also use a real language like C.
--- 2596437
>>2596434
but then I can't refer to union I allocated in main.cpp in other header files

// main.cpp

#include "MyData1.h"
#include "MyData2.h"

union
{
 MyData1 myData1;
 MyData2 myData2;
} myUnion;


// MyData1.h
struct MyData1
{

};

extern ???? how do I extern to myUnion.myData1;
--- 2596439
>>2596437
Like anything else? Define the union as type in a header, the variable using the union as extern, put the real definition in a source file.
--- 2596654
>>2595605
>Parallax Propellor
I can use this for all my microcontroller needs? I just wanted to read a bunch of sensors and stuff like that.
--- 2596763
>>2596654
You might want something that has an ADC then.
…among other things.

Of course, if you already have a hundred of these things you got for free, you could make it work with effort.
--- 2596775
>>2596413
>wouldn't know how to connect two computers with an USB cable

poor kid.
your mamma never got you a Windows Easy Transfer cable for X-mas.
--- 2596814
>>2596654
I'd probably recommend using a high-end STM32 like an H7 series for an end-all be-all of microcontrollers. The propellor is kinda a niche device designed for high-speed real-time applications as an alternative to using an RTOS, so I see it as competing with low/mid-end SBCs more than with microcontrollers. I added it to my list as a meme.
--- 2596846
Anyone here played around with FPGAs before? I bought a Spartan6 board but it's kinda hard to use and the IDE is a fucking pain (it's called ISE design suite)
Are there any FPGAs with open source toolchain and which are good for learning? I have clearly bitten off more than i can chew
--- 2596882
>>2596775
>obviously device sitting between the cables, "active" cable
>needs special software
You're wasting my time, retard.
--- 2596932
>>2596882 >>2596775
He is 100% correct.That is not a USB A-A cable," dumbass. That's a ms garbage cable like the old Xbox controllers use. 

The hypothetical "null modem" A-A cable anons are talking about, which somehow autonegotiates host/slave, pin orientation, and so on (like modern Ethernet controller can do point to point without a switch), does NOT exist. It is NOT part of any USB port standard to include network switching. There is no A-A cable which replaces an Ethernet cable like >>2595906 >>2595410 >>2596185 >>2596132 and so on are suggesting.

If there is such a cable, it is something like >>2596775 which is mfg specific and essentially acts as a third PC in the middle. More importantly for this conversation it's not a USB standard anything, and there is no such device, just proprietary hack addon stuff like this.
--- 2596936
>>2596932
Indeed, USB B, Mini, and Micro are the same way - you'll never see a male to male - they are designed to be physically impossible to reverse host and slave. The square USB B port in particular was used for printers, external HDD and so on. Mini was used mostly for digital cameras. Why not just use mini to mini or micro to micro cables, and put mini or micro ports on PCs? Because they're exactly the same wiring as A and therefore "dumb" single-orientation limited. There are no mini or micro ports on PCs or other hosts, despite this obviously being an advantage over A ports (you can fit 3x as many, and they have better hold strength!)
--- 2596938
>>2596932
I heard USB 3 is supposed to be able to do this. With OTG, a device can already switch host/slave roles. I didn't try to lookup the details of this in the standard, and I've never seen it working for PC to PC yet.
--- 2596942
>>2596938
>OTG,
For cables before USB 3.1/C. It's not plain USB either, it requires extra lines in the both cable and connectors. Devices have to have an "OTG port", in a sense, which is conceptually "backwards-compatible with USB" cables. https://en.wikipedia.org/wiki/USB_hardware#USB_On-The-Go_connectors 

USB-c ports and particularly 3.1 cables have all this built-in, there is no "OTG cable," and from 3.1 forward indeed the network negotiation is automatic and auto-detecting. But there is no similar functionality with the ol' A, (or B, Micro or Mini) ports.
--- 2596944
>>2596942
>https://en.wikipedia.org/wiki/USB_hardware#USB_On-The-Go_connectors
better detail at https://en.wikipedia.org/wiki/USB_On-The-Go#Plug
--- 2596945
>>2596938
>>2596775
>>2596405
>>2596217
>>2596132
>>2595906
>No, A to A.

See picrel, AAfags btfo
--- 2596949
>>2596942
>USB-c ports
which have RETARDEDLY many pins, by the way, up to ~5x as many as old USB and 3x as many as Ethernet's RJ45. So it's no surprise THOSE should be superior, they're a dumbass """futureproof""" cable that can't go longer than about 5 meters passively, and costs a fortune on a spool anyway. Honestly the transfer speeds on USB-C should be way, way faster than they are, this is like a star trek cable.
--- 2596953
>3 slaves on I2C bus
>one slave stops working after years
>hard to debug
>can't even figure out which slave is fucking up
Never again, only bit banging and point-to-point I2C now.
--- 2596963
>>2596953
>>can't even figure out which slave is fucking up
--- 2597052
>>2596936
Well no, USB micro and mini have both A and B variants (e.g. master and slave variants), and there's also USB Mini AB and Micro AB, which can act as both master and slave. Though it uses OTG pins for identification. PCs didn't use Mini A or Micro A because they're barely used anywhere.

>>2596945
>micro A to micro B isn't deprecated
huh
--- 2597063
>>2596945
>>2597052
Why the fuck did they add so many connectors. Universal my ass.
--- 2597073
>>2597063
There's only 4, really. A, micro, mini and C. The A, micro and mini come in male and female versions. USB 3.0 Micro-B is an abomination.
--- 2597104
I need to read the temp of 2 relays near my breaker panel, which is about 15 feet from my server rack. I have DS18B20s plugged into a Arduino Nano. There are no plugs near my breaker panel, but I do have a 24v transformer for the relays. The relays are running 4 base board heaters. The relays eventually stick closed, overheat and need replacing. Last time they left scorch marks. Once I get temp readings into a computer, I can easily configure Xymon for monitoring.

How would you do PC to Arduino communication over 15-20 feet? 
My options: 
a- have the Arduino near the computers, run 1wire over 15 feet;
b- have the Arduino near the relays, run 15 feet of USB;
c- have the Arduino near the relays, talking to the computer via RF24+ modules. I hate wireless though.

Is there another simple mcu to mcu communication method?
--- 2597259
>>2597104
D- replace relays with ssrs and forget the whole rube goldberg schtick.

If relays are failing often enough to warrant the effort of monitoring them they are likely underspecd. Ssrs and be done.
--- 2597274
>>2597104
Do you have arc suppression components around the relay terminals? That’s diodes for DC switching, and snubbers and/or TVSs for AC switching.
--- 2597305
>>2597052
>>micro A to micro B isn't deprecated
>huh
could've fooled me too, lol!

>>2597052
>can act as both master and slave. Though it uses OTG pins for identification.
Personally I still think this is fundamentally different. One (only one) of the cable's jacks has the corners cut off to identify it as the ""slave"" side, and powered devices with OTG compatible ports have those cutoffs on them (or vice versa, I always forget). This entire standard is an awful mess. USB became way too popular way too fast.
--- 2597307
>>2597104
>a- have the Arduino near the computers, run 1wire over 15 feet;
definitely not this

>>2597104
>b- have the Arduino near the relays, run 15 feet of USB;
that's still a lot of USB, but this requires zero work otherwise

>>2597104
>Arduino near the relays, talking to the computer via RF24+ modules.
have you considered replacing your arduino with an ESP32 or similar with built-in wifi and bluetooth? Then you can use your existing wireless network, or pair to your computer/phone given it has a Bluetooth radio. They aren't much more expensive.
--- 2597319
>>2597307
I already have 1wire run that goes from my basement to the attic. It's on parasitic power, no less. Works like a charm.
--- 2597331
>>2597319
disgusting. But if that is working for you, why do something else? It's certainly the cheapest and easiest to replace
--- 2597340
>>2597305
Honestly I kinda like the idea of master-to-slave cables being used between devices with identical AB connectors. That way you're explicit about the direction of control only via the cable. So a standard printer cable would have the master be the PC but the slave be the printer, but if you wanted to print images or upgrade firmware via a flash drive you could do that using the same port. Though I guess in this case it's more convenient to just have a seperate port for that. A phone is a better example, acting as a master for a keyboard or flash drive, or a slave when connected to a computer. Not like anyone ever made a phone thin enough to need anything other than USB mini connectors, which are only like 4 or 5mm high and can be edge-mounted.

Having bidirectional transfer as negotiated by the devices is obviously a lot more convenient to the end user, so I can see why USB C was developed, but why not just develop a new connector for ethernet? We don't need 50 damn pins, ethernet has been doing over 10 gigabit speeds and power delivery with only 4. That said, the PoE standards put power differentially between pair sets, so you'd ether need a floating level-shifting data transceiver, or to cram signal transformers in either end. Doable.
--- 2597539
>>2596945
>jpg
stupid
--- 2597541
>>2596945
--- 2597543
>>2597063
It's been around since '94 afaik
Just use USB C and do everything via CC wire and the cheap eMarkers or even just resistors usually
--- 2597544
>>2596945
here i optimized your jpg bro
--- 2597557
>>2597539
>>2597541
>>2597544

The jpg looks perfect on my monitor. Is this a religious thing, or a joke I don't get?
--- 2597605
>>2597557
>The jpg looks perfect on my monitor.

it's possible to specify a high quality jpg.
but the catch is it's gonna be huge.
that 520K would be about 10 times smaller as a GIF.
however, you cant then convert to GIF to make it small.
coz it's permanently fuckered by the JPG dandruf.
--- 2597606
>>2597598
When the world is perfect we’ll be able to use ps/pdf or svg instead of living in the mspaint era.
--- 2597610
>>2597605
>>2597544 is obviously a troll, because his jpeg is larger than the original ones, and adds tons of artifacts. But I've seen similar posts for gif. gif really is hard to use efficiently, so it makes sense.
--- 2597616
>>2597605
>that 520K would be about 10 times smaller as a GIF.

I'm not disagreeing with you, but GIMP is. I didn't see any gif settings, and this is what it made. Still looks sharp and no visible dandruff, but file grew a bit.

this is fun
--- 2597619
>>2597616
and the holiest of holies, the beloved png. my god look at that file size (compression 9).
--- 2597625
>>2597616
>no visible dandruff

your GIF does have the JPG-added dandruff.
which probably means it was converted.
to get a small file, you have to start with the original work, not JPG-ruined work.
--- 2597641
>>2597625

well fuck, you are correct
--- 2597665
>>2597104
>talking to the computer via RF24+ modules.
Forget this one. nRF24L01+ can't talk through walls.
--- 2597684
I've been curious about my (young) kids toys. They have LEDs, make noises, and some have some moving parts. Unfortunately they still play with them, but I am interested to know what is used for these toys. 

I was really fascinated by the use of some physical binary using little bumps of plastic to hit switches which allows the toy to make different sounds. For instance, one has blocks that have the alphabet on each block, so when inserted the toy speaks the letter. 

I've seen guys at work use Segger to access some mcus I've been around, but is there anything cheap that I could use to access these chips?

Also, I assume that most are coded in C? Or C++?

Sorry for being a fag. I'm sorta of new to this board.
--- 2597716
>>2597684
a lot of them do use microcontrollers hidden under an epoxy blob

tamagotchis used some 6502 based MC
--- 2597770
>>2597684
For cost optimised stuff, there often isn’t a way of reading back the code. One-time programmable chips, or chips with their security fuses burnt, are common. Even if you can find a micro that hasn’t been locked down, you may well find that it requires a proprietary programming hardware. 3rd party probes built by companies like Segger may cover more of the non-standard ones, but I don’t think they have good coverage over cheap Chinese hardware. The software end is also often confusing. But it’s not like you can’t just bit-bang an arbitrary protocol using an arduino and interpret the data stream if you have the documentation.

Once you have code downloaded off a micro controller, you’ll find it’s compiled machine code, not human readable C. You can turn this back into assembly language using a disassembler, if you can find or make one for your instruction set. But assembly isn’t exactly human readable either. Decompilers kinda exist, but getting them to work on a given instruction set may not be trivial at all, plus the C it generates probably isn’t very well written.
--- 2597890
I want to build night-time stairs light using 18650 bats. The intention is to power down attiny85 and wake up by 8s watchdog interrupt during day to check for ambient light level and once its dark enough the powering down will cease and real operation can start.
Is this approach good to save as much power as possible outside during non-operating hours ?
Would some circuit controlling power outside of chip (like schmitt trigger + photoresistor) be more power efficient ?
--- 2597931
>>2597890
>some circuit controlling power outside of chip

i'd use one alarm watch to turn on the light, and another one to shut it down. 
no CPU needed.
of course, i have a lot of old watches, so that may not apply to everyone.
--- 2597932
>>2597931
would be kino, but I want fancy shit like slow fade in/out, bat indicator, maybe bluetooth...
--- 2597933
>>2597932
>I want fancy shit

could still use external timers to set interrupts.
--- 2597934
>>2597933
that's my question, whether external would be somehow more efficient than using watchdog
--- 2597944
>>2597890
>8s watchdog interrupt
Yes that's what I'd do. The light sensor will take maybe a few µA to run, while the MCU in power-down mode is more like 50nA. The alternative is running the analog comparator through an interrupt, but that can only be done at idle not at power-down, which is like 60µA even at slow clock speeds. In order to save as much power as possible, I'd connect the light sensor like pic related, such that the power to the sensor is gated by a GPIO, so you can turn it on only when the watchdog timer triggers. You may also need an identical circuit with a standard voltage divider to measure battery voltage relative to an internal 1.1V reference, in order to calibrate that out, and to also prevent the LED turning on when the battery voltage is too low. You could use a discrete logic-level MOSFET (e.g. AO3401) to activate the LDR and voltage divider, but at the kind of currents they draw the high-side FET of the MCU's push-pull output should be fine. Such a FET is a good idea for LED driving though, and I guess you could use the MCU as a switching regulator.
You'd run the MCU directly off the 4.2-3.2V battery since LDOs burn too much power. And I think an LDR will be more power efficient than a photodiode.

All that said, a few 18650s is a lot of energy compared to 50nA, and your LED power usage is probably going to dwarf even a 100µA standby current, so power savings when it's light out isn't THAT important. Also maybe an ATtiny85 is overkill, a tiny25/45 would work, even a tiny13 is probably fine. But use whatever you have lying about.

>>2597934
Watchdog should be way lower power, external timers are more useful when you want accuracy over a long period of time (e.g. an RTC) but that's not really the case. Having the watchdog timer running shouldn't increase your quiescent current too much, but read the datasheet properly to be sure.
--- 2597946
>>2597944
I kneel, thanks
--- 2597949
>>2597610
I did NOT add artifacts. I merely increased the contrast to expose the artifacts that are already there.

except you know, every time you re-save an image as jpeg it adds artifacts, so yeah I guess I did. Which is exactly why jpg is garbage
--- 2597950
>>2597619
The only reason that filesize is so large is because it is LOSSLESSLY trying to preserve all the JPG artifacts that are there.

If that image was saved as a PNG originally, the file size would be MUCH less than the jpg, while also having ZERO artifacts
--- 2597951
>>2597619
just take another screenshot of the original chart, but save it as a PNG this time. it will be like 250KB
--- 2597955
>>2597950
Not quite the same resolution, but that should just be a linear comparison
Page is here: https://en.wikipedia.org/wiki/USB_hardware
--- 2597959
>>2596945
>>2597955
This JPG was 1943x1934 and 528kB, so 7.11pixels/B
My PNG was 1394x1132 and 272kB, so 5.80pixels/B
So the PNG was less dense at storing pixels, compression artefacts notwithstanding. I bet it would be significantly smaller if I disabled antialiasing on font rendering, those slightly blurry edges are what the FFT algorithm of a JPG likes to compress, and what a more straightforward spacial-domain compression like PNG is bad at compressing. GIF even more so.

Re-exporting that PNG as a PNG using GIMP outputs a file that's 224kB, so somewhat smaller, using maximum compression. I guess my screenshots aren't as compressed as they could be then.
But when I save that PNG as a GIF in GIMP, it's only 110kB. And when I then save that GIF as a PNG again, it's only 65kB. So I think I'm losing maybe a little bit of information by doing that, but it's basically not noticeable. Here's the GIF.
--- 2597966
>>2594357
CH32V does not, and if you are sane you want debugger anyway
--- 2598076
>>2597959
yes the anti-aliasing is causing there to be many more colors in the image. 
The screenshot right from the get go had 2,909 colors. 
For a lazy option, you can just set to indexed color with 256 total colors for good results. 
I like to experiment with what I can get away with.
For pic attached, I chose 48 colors, and I think it looks good. less than 50KB

My resolution is lower due to laziness, I am on a 1440p monitor
--- 2598078
>>2598076
oops wrong image. still under 70KB though
--- 2598131
SHUT THE FUCK UP ABOUT IMAGE FORMATS
IT'S TRIVIAL AND NOT INTERESTING AND OFF TOPIC
Talk about USB and why it's retarded. Why didn't ethernet win?
--- 2598133
>>2598131
>Why do people prefer to connect peripherals with a peripheral bus and not a network?
Gee, I dunno. Maybe because USB does the job of connecting peripherals better?
--- 2598141
>>2598133
I maintain it's a software problem.
--- 2598181
>>2597544
>>2597616
>>2597619
>>2597955
>>2597959
>>2598076
>>2598078
You're all faggots. And so is the wikipedo faggot who didn't put an anchor link to this table.
https://en.wikipedia.org/wiki/USB_hardware
--- 2598352
>>2598131
>its ok to use an image format that adds shit tons of artifacts, demolishes the image, and has a larger filesize than one that is lossless yet with a smaller filesize
--- 2598360
>>2598131
An Ultimaker Aquila 3D printer uses images with compression artefacts instead of rendering text for its UI. Posted an image a few 3dpg threads ago. In what universe is this a good idea? Surely it would take more of every resource available to the microcontroller
--- 2598370
>>2598131
>NOT INTERESTING
you are CLEARLY wrong, otherwise we wouldn't be fighting to the death over it
--- 2598371
>>2598181
>anchor link
is one post up, fellow faggot >>2596944
>>2596942
--- 2598998
So I bought led panels like pic related. I googled schematics on turning one on with a TTP223 touch sensor module. I got it to work, simple circuit using resistor irfz44n. But I am wondering how would I adjust the brightness? I was messing with potentiometer and having it on the power line to the panel but it seems not a proper way to do it.
--- 2599013
>>2598998
PWM

if you don't like flicker you can analog lowpass it to DC, but desu the people who complain about led flicker are /x/
--- 2599021
>>2599013
> PWM
Humming and flickering, thanks no thanks for useless advice.
--- 2599039
>>2598998
two options:
pwm. recommend anything above 20khz, you wont hear or see it and you can easily filter it with a nice LC filter. Or, a LED driver which is just a small constant current power supply. commonly switch mode and filtered through linear reg.
--- 2599046
>>2592769
Lattice Icestick?
--- 2599048
>>2599021
>Humming
doubt
>flickering
he literally gave a solution
Use PWM with a moderately high frequency and there will be no problems.
--- 2599050
>>2599021
PWM at over 20kHz, there will be no noticeable flicker and any noise will be above the audible range anyhow. But you only get hum with magnetics, since the wires in the inductors can vibrate with the force on them. A simple PWM circuit has no magnetics, and so there shouldn't be any hum at all.
--- 2599098
Bros, give me some tips to get started with some beginners robotics projects.
I only have rudimentary knowledge of Arduino and have only made a smart lamp with it before. This was a project I had to do but I got more interest and wanted to continue on my own.
My original intention was to make a robot on wheels that can follow my cat around. Unfortunately, it seemed way to difficult and I wanted to try something easier. I now want to create a robot that I can control and see through my phone using Wifi. I'll need both camera and wifi modules for that. An older robotics club member from my college recommended that I try Nodemc's esp32 microcontrollers since they're better for anything with wifi and cameras. Plus, they're much easier on my wallet because the Arduino prices are astronomical in my country right now.
I can't seem to find a good enough board with the 8266 chip that can support both wifi and camera. its always one or the other. Do I have to buy some other board for that? There's not enough pins to connect batteries, motors, camera and wifi modules in the cheapest boards.
--- 2599108
>>2599098
Basically all ESP8266 boards should support wifi.
--- 2599110
>>2599013
BTW anon Im not this person here. >>2599021

I appreciate the advice,.

>>2599039
Can step down buck converters work like this?
>https://www.aliexpress.us/item/2251832463081849.html

 or would I need to use something like this?
>https://www.aliexpress.us/item/3256804594280337.html
--- 2599117
>>2599108
yeah but I couldn't find any of those boards that could also handle motors, servos, cameras
--- 2599120
>>2599110
A buck converter will work since those LEDs already have current limiting, but you'll find that the brightness drops off nonlinearly compared to simple PWM. Below 3V you won't get any appreciable light out of the LEDs at all. If you search "5V LED PWM" you'll get a selection of boards that should do the trick, go for one that says "PWM" and maybe "motor speed controller", as opposed to one that says "constant current". The constant current ones will work, but will get a lot hotter.

>>2599117
Camera ports are one thing, but motor drivers are something you should expect to be external. Chances are you'll want more motor outputs than a little dev-board has anyhow, and in the event that an ESP8266 board doesn't have enough I/O pins consider an ESP32 or RP2040 board instead. Either make a hodgepodge of dev-boards, or buy motor driver ICs/transistors and mock up a protoboard or PCB with them. You'll also likely want a step-down switching regulator. If you're using servos with integrated drivers then you can get away with not having motor drivers on your board, it would just be a matter of including power and signal connectors for them.
--- 2599171
Are the raspberry pi alternatives a drop in replacement?
If not, how much of a pain is it do adapt existing software to them?
--- 2599173
Im developing a system using freertos that would require single publisher task to send big data chunks to multiple observers (pass by copy is not an option). currently Im thinking about using freertos queues with a pointer to the memory chunk but im not sure how would I signal to the publisher that the memory chunk is no longer processe and can be safely overwritten? it is single writer to multiple readers
--- 2599195
>>2599171
It's just Linux. It could range from no effort (you're running a normal userspace program that needs standard stuff like Ethernet or USB) to impossible (you're using their video engine with proprietary API).
--- 2599208
>>2599120
>but you'll find that the brightness drops off nonlinearly

I believe I experienced that, when I tried a schematic I came across, it dimmed the LED slightly, and it stayed like that until I turned the pot all the way.
--- 2599478
>>2599173
semaphore, mutex, task notification will all work to tell it that it is ready to be overwritten again. cant say much else without knowing more about the system
--- 2600095
How the hell do you store these things? I can't find a proper way to store them anywhere and they just leave a huge mess.
--- 2600099
>>2600095

easy.
you probably have a few of these from primary/secondary school.
if not, just beat up some students and take theirs.
--- 2600107
>>2600099
I mean, I've got one of those small drawer things, but it's so damn hard to keep them in there.
--- 2600147
I'm pretty bad at electronics so this is a really dumb question.

Can I hook a switch up to a RJ11 connector? My switch needs to be pretty far from the actual MCU. I heard I might get some interference issues but I think phone wires are built with that in mind.
--- 2600151
>>2600107

The smallest variant of this will nicely hold a couple hundred jumpers. Then I just stuff the lot into one of the compartments of the organizer I keep those sorts of wires in.
--- 2600281
>>2600147
>a switch up to a RJ11 connector? ... I might get some interference issues

you can if it's 10/100Mbps, but it might degrade speed on gigabit stuff.
it's the wire twists that make the cable reject interference.
the switch and wiring will mess with the twists, thus potentially causing slow-downs.
--- 2600311
>>2600147
Ultimately the cable is what matters, not the connector. For noise immunity, wires like CAT5 or CAT6 or what have you are decent, so is coaxial like RG58. But I don't imagine you'll have problems with that unless the signal strength is really low or particularly high frequency, in fact you're more likely to have issues with capacitive coupling between the wires (see phantom LED bulbs). More importantly, how much current does the switch need to pass? Worst case scenario the voltage drop would be so large without an expensive amount of copper that you'd be better off using the wire for a low-power switch that toggles a MOSFET or relay.

If it's just a switch feeding 5V or whatever to a GPIO as an input, then any old multi-core wire with a sufficiently strong pull-up like ~1kΩ and a ~1nF debouncing cap should work just fine. Using 3-cores with an SPDT switch removes the pull-up out of the story so is much better for quiescent current, though I think keeping the capacitor is still a good idea.
--- 2600355
>>2600095

if you have a 3d printer
https://www.thingiverse.com/thing:4549127

if you don't you can always get some cardboard or whatever and diy your own.
--- 2600360
>>2600095
--- 2600365
>>2600281
>>2600311
I think these answered my questions, thanks. I wanted to use these connectors and cables because that's what I have on hand.

Yeah, I should've specified that it's for GPIO which I think is 3.3V?
--- 2600517
>>2600355
That's a fairly neat idea. I do have a bunch of carboard boxes I can tear up and use.
>>2600360
This or just some Tupperware would also be a decent idea.
--- 2600736
Hey, I'm finally attending an Embedded Systems class in uni. 
The problem is that my teacher decided to use the 8051 as his platform of choice (the other teachers used PIC/AVR, so I even bought some in anticipation) and his classes are pretty shitty with 2 big projects as evaluations, so I'll have to learn ASM by myself and I wanted to get a dev board to try stuff out in the flesh.
In my country, 8051s are already rare, and shipping from Digikey/Mouser/whatever costs an arm and a leg (on top of paying in dollars), so I don't know if those Silicon Labs kits are an option (I saw someone in the archive mentioning the C8051F850 USB ToolStick kit as a cheap kit, but it seems to be discontinued). Most 8051s avaliable here are the old Atmel parts and some random ancient Intel/Philips ones.

So, apparently, I have 2 options:
>use an AT89S51/52 on a breadboard and program it with an USBASP/Arduino programmer
>order one of those chink STC 8051 kits
Having to use headers and removing/putting the chip back is a massive pain in the ass, though, so I was wondering if there was a way to combine the USBASP circuit with a normal devboard circuit to create something more practical to use (like an Arduino/STM32 Nucleo with its programmer section).
And on the STCs, are their toolchains decent? It seems like people have taken a liking to them and built some cool stuff recently, but there are so many part numbers that I don't know what should I order for maximum compatibility with my course, since some STCs seem to have some odd modified 8051 architecture.
Thoughts?
--- 2600745
>>2600736
For MCU selection, it doesn't look straightforward at all to use a USBasp to program an AT89S51. Looks like the cheapest solution is to flash an arduino with some dude's code to be a programmer, plus software other than AVRdude. It would be more reliable to buy a dedicated Microchip brand programmer and use MPLABX or whatever, but I can imagine not wanting to pay for such a programmer. No clue about the chinese clones. Plenty of other people made 8051-based chips so you might find a nice dev-board with integrated programmer by someone like Cypress or TI.

If your prof or previous students recommend a certain method then I'd lean towards doing that, ask around.
--- 2600762
Also, are PICs supposed to be infuriatingly annoying to program?
>MPLAB IPE and MCC didn't even render text correctly until I replaced the JDK version that ships with it
>device not recognized
>programming voltage too low 
>try putting a pin bar on a part of the breadboard to connect the programmer and use other jumpers to connect to the micro
>doesn't work
>try an old PIC adaptor board that was vacant on my uni lab
>doesn't work
>only way to program is by connecting the wires directly to the micro with separate pins stuck on the parallel breadboard holes
>invalid calibration value message is always present, but doesn't seem to do anything
>have to put it in a "programming area" of the breadboard and put it back into the circuit later
Breadboarding a PIC10 already seems like hell, I can barely imagine using one that requires an external oscillator. 
I think I'll just make a cheap "devboard" with perfboard for it with header pins.

>>2600745
Yeah, the integrated ISP would be more of a future project. I already have an Arduino, so I might use that.

>If your prof or previous students recommend a certain method then I'd lean towards doing that
The guy's a substitute and it's only his second semester teaching this class, so there's nothing established (apparently he himself mostly programs PIC but for some reason decided to use 8051, lmao).
I think no one bought a devboard for that class, because everyone just did the final projects in Proteus. I'd get the physical micro to learn more, basically.
--- 2600773
>>2600762
Breadboarding a raw MCU is generally not a good idea anyhow. Put it on a PCB with two rows of pins like an arduino nano, plus a reset button and any crystals/caps/etc. it needs. And always put an ICSP header on the board. Takes the guesswork out of programming it. If you make one out of perfboard, I'd advise something like vero-board that already has some connections on it, that way you don't have to blob solder from IC to pin.

Also don't cheap out on breadboards.
--- 2600890
>>2600736
> 8051
Good. You might actually learn something. You look up microcontroller in the dictionary and there’s a picture of an 8051.

Silabs makes a bunch of 8051 based stuff. Should be obvi that new 8051s kick the original’s ass.
--- 2600962
if i take this camera and connect it to ordinary esp32 by using the same pins it uses on the esp32-cam will it work? or is there some catch?
--- 2601152
>>2600962
maybe...maybe not. if its a different brand cmos insise ir probably wont because they have different registers
--- 2601267
Does it make sense to use microcontrollers with no through hole packaging available for hobby projects? I want to prototype on a breadboard first, saw that there are smd to longer pin adapter boards available, but I have never soldered smd before and worry that this might be an error source that could be avoided by just picking a different avr with slightly less suited features. What is your experience with this?
--- 2601297
>>2601267
>worry that this might be an error source

stop being a mama's boy.
watch a couple of videos and then DO IT.
if you fuck up, just DO IT some more.
like in every video game, you have to grind to level up.
--- 2601302
>>2601267
if you never try anything you will never learn anything
a microscope is pretty much necessary for first time fine pitch ic imo.
hot air station wouldn't hurt either.
--- 2601362
>>2601267
If you need a microcontroller to be fast enough that you can’t use an old THT PIC or AVR, then chances are the breadboard isn’t going to be doing you any favours. If you’ve done research into the required tool chain and such and have decided you can handle it, then go for it. Soldering SMD is pretty easy with a non-shit tip, at least for SOICs. TSSOPs and QFPs are somewhat worse, QFNs and the like are getting into hot-air or reflow plate tech. Note that you can use JLC or PCBWay’s assembly service to just make a bunch of dev-boards instead of hand soldering them all.

Conical tips are for shitlords, screwdriver tips are king.
--- 2601414
>>2600773
Oh yeah, I just soldered a male header for the ICSP, females for the pins and a socket, and it programs without any problem now. Connecting everything was horrible, though.
I ended up getting the AT89S52 because it was readily avaliable here and ordering >>2600890 would rape me with shipping. Will assemble the perfboard 8051 "devkit" tomorrow and report results.

By the way, I noticed something: 
I found an old as fuck PIC16F428A at uni. Looked it up on Microchip's website and they recommend using the PIC16F18444 for new designs.
16F18444 is objectively superior to the 16F428, has far more peripherals and is half the price on retailers. However, there are barely any projects/tutorials using them. And almost every tutorial for it is ancient (back when CCS/MikroC were still relevant, almost no XC8 resources).
The same happens for other classic PICs like 10F202, 12F629, 16F84, 18F4550, 16F877 that have superior models released later that everyone seems to ignore. And because of that, stores in my country only seem to carry the old models while the new ones are unobtainium.
I understand that this is because of the Arduino phenomenon, which made everyone drop PICs as soon as they could stop having to deal with their crap. 
But then, why the fuck didn't Microchip start making cheap USB programmable boards immediately after noticing how practical Arduinos were, to recoup their losses?
Those Curiosity Nano boards look pretty cool and do have more recent PIC/AVR offerings, but they're expensive as fuck so I've never seen any mention of them in the wild. Now it seems that the only guys on PIC are due to momentum, weirdos/contrarians, or the ones who use them professionally.
For the amount of peripherals, you'd think it's a decent deal for more specific uses (except for all of the Microshit garbage you'll have to deal with).