hybridfree/eevblog-posts huggingface dataset:
ch341a program - Page 1
Forum section: electronics / general

author: papele
author_rank: Newbie
timestamp: October 14, 2020, 12:19:17 pm
content: Hello i have a programmer ch341a. which software should i use virus free. thank YOU.

author: ledtester
author_rank: Super Contributor
timestamp: October 14, 2020, 01:33:21 pm
content: There is some info on open source applications on this page:https://github.com/boseji/CH341-Store#ch341a-programmer-application

author: PKTKS
author_rank: Super Contributor
timestamp: October 14, 2020, 01:48:52 pm
content: On Linux you better be warned that there are some serious issueswith the kernel module driver for CH341-uartIt has been affecting a whole range of interfaces based on CH341.Still unsolved so far. AFAIKPaul

author: PKTKS
author_rank: Super Contributor
timestamp: October 14, 2020, 02:06:13 pm
content: Quote from: ledtester on October 14, 2020, 01:33:21 pmApart some schematics the DRIVERs provided there are useless.The linux version dates kernel 2.6.x while even recent 4.x LTSreleases still contains the issues with CH341 uarts.I am still looking for a well known good patch to solve issueswith these USB IDsCode:static const struct usb_device_id id_table[] = {{ USB_DEVICE(0x4348, 0x5523) },{ USB_DEVICE(0x1a86, 0x7522) },{ USB_DEVICE(0x1a86, 0x7523) },{ USB_DEVICE(0x1a86, 0x5523) },{ },};
C nibble problem - Page 1
Forum section: electronics / general

author: PerranOak
author_rank: Frequent Contributor
timestamp: October 07, 2020, 04:38:10 pm
content: I am running this simple programme on a PIC12F683:Code:#include <xc.h>#include <stdio.h>#include <stdlib.h>#define _XTAL_FREQ 4000000#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)#pragma config MCLRE = OFF // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to VDD)#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)#pragma config BOREN = ON // Brown Out Detect (BOR enabled)#pragma config IESO = ON // Internal External Switchover bit (Internal External Switchover mode is enabled)#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled)void main(void){TRISIO = 0;int count = 0;int temp = 0;while(count < 16){GPIO = count;temp = count;GPIObits.GP4 = temp >> 3 & 1; //because GP3 is input only__delay_ms(500);count++;}}I have LEDs attached to the GPIO pins 4 and 2-0 because GPIO3 is input only. So, I write "count" to the GPIO register then right-shift it three times (via "temp") then "AND" it with b00000001 to get the digit that should be in position 3 and write it to GPIO4 where the final LED is connected.I doesn't work. It looks like the lower 3 LEDs count and light very quickly (almost invisible) then GPIO4 lights normally for 500ms and the process repeats. It's as if it is ignoring the "delay" command when displaying the lower three.If I comment out the "GPIObits, etc." line then it works perfectly with the LEDs lighting for the 500ms and counting as expected, of course GPIO4 doesn't light.What can I be doing wrong?Cheers.

author: KrudyZ
author_rank: Frequent Contributor
timestamp: October 07, 2020, 05:08:01 pm
content: I would assemble the word in one go.GPIO = (count & 0x07) | ((count << 1) & 0x10);There are more parentheses than are strictly needed, but better be clear than getting bitten by operator precedence.

author: oPossum
author_rank: Super Contributor
timestamp: October 07, 2020, 05:53:22 pm
content: Turn off all analog features. They can interfere with RMW (read-modify-write) operations.Code:GPIObits.GP4 = temp >> 3 & 1; // This does RMWCode:// Turn off analog stuffCMCON0 = 7;ANSEL = 0;

author: PerranOak
author_rank: Frequent Contributor
timestamp: October 08, 2020, 10:19:37 am
content: Thank you oPossum this solved it. I am ashamed that I didn't remember ANSEL but I would never have thought of turning off the comparator.KrudyZ: cheers - my code is a lot slicker now.
TCP Sockets in Python - Page 1
Forum section: electronics / general

author: rx8pilot
author_rank: Super Contributor
timestamp: October 09, 2020, 08:16:15 pm
content: I started a project that seemed simple enough.....but stuck at the very beginning.Goal:Send / Receive commands over TCP from a Python program on a PC to an industrial controller.The test setup was to configure all machines involved and used PuTTY to verify everything is connected and working. All good.The data is very simple, each command is only a few characters long. I can watch the display on the industrial controller side.Here is what is have done in PuTTYCode:?E10 45>!>?Q600 10>MACRO, 45.0>The commands start with ?Q or ?E. In this example, I wrote the value of 45 to location 10 and read location 10 to get the value of 45 back.PuTTY session is RAW.In Python, I have not been able to send the same commands. I even monitored in Wireshark and it looks like it is sending the right data to the right place but the remote controller system does not recognize the command. No errors.Test code snippet.....Code:import socketimport time# TCP data for remote Controllerip = "192.168.198.225"portDprnt = 8080portData = 2525addressDprnt = (ip, portDprnt)addressData = (ip, portData)HEADER = 60FORMAT = "utf-8"# Connect to remote server CNC machinewith socket.socket(socket.AF_INET, socket.SOCK_STREAM) as clientData:clientData.connect(addressData)# Grab some number of lines of datafor i in range(5):cncCommand = "?E10 " + str(i+1)clientData.sendall(cncCommand.encode(FORMAT))print(cncCommand)time.sleep(.5)print("All done")Trying to send "?E10 1" , "?E10 2",...... through "?E10 5" as a test. No errors, I can see the data on Wireshark yet the controller does nothing. Wireshark looks the same when I manually send the same data over PuTTY.Guessing I am missing something very minor....maybe an LF or something?

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 09, 2020, 08:54:15 pm
content: Quote from: rx8pilot on October 09, 2020, 08:16:15 pmYeap. Probably a CR a LF or both.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 09, 2020, 11:59:25 pm
content: Quote from: NivagSwerdna on October 09, 2020, 08:54:15 pmYes - indeed.I had tried a few things earlier. When I looked at the previous commits, I had a syntax error '/n' instead of '\n'Geez.Seems to be working as intended now, of course.
RPMB partition solution I present for you - Page 1
Forum section: electronics / general

author: Postal2
author_rank: Frequent Contributor
timestamp: September 21, 2020, 08:27:57 am
content: Many people know that eMMC has a dedicated RPMB partition. How do I copy it? It's very simple. The following concept is proposed. If you need to have the original RPMB, you do not need to change the defective eMMC, but substitute a new (and even sd-card) in parallel. All lines are connected together, except for the CMD - a switch (two) at the break of this line. After that, a fairly simple firmware for the FPGA is created, which controls the switches on the CMD line (or switches built into the FPGA). The key point here is that the commands from the host first pass simultaneously to both eMMCs, but the FPGA manages to compare the command with the mask before sending the CRC and disables the CMD of the unnecessary eMMC before the CRC transfer is completed. CRC does not match and unnecessary eMMC (or sd card) is disconnected from data lines. Also, FPGA, due to the switches and direct connection of itself to the CMD lines, provides the same identifier (RCA) at the time of start.Just a few conclusions and simple firmware ...Didn't you know about this? Have you read about this on the Internet?Think why ...
Nvidia to acquire British ARM - Page 1
Forum section: electronics / general

author: TheNewLab
author_rank: Frequent Contributor
timestamp: September 14, 2020, 10:18:14 am
content: BBC says the Japanese firm that owned the ARM tech is selling to US chip manufacturer Nvidiais that technology still under patent? Does Nvidia a US firm, really manufacture the chips? If actually manufactured in China, does this make any difference?https://thetechportal.com/2020/09/14/nvidia-arm-acquisition/BBC says British ARM is a "jewel of the crown" of tech technology.https://www.bbc.com/news/technology-54142567WIll Trump force Nvidia to move manufacturing back to the US? AS in "Made in the USA"

author: tunk
author_rank: Super Contributor
timestamp: September 14, 2020, 10:26:09 am
content: There's already a thread about this:https://www.eevblog.com/forum/general-computing/softbank-considering-selling-arm/msg3231950/?topicseen#msg3231950

author: coppice
author_rank: Super Contributor
timestamp: September 14, 2020, 10:26:31 am
content: Quote from: TheNewLab on September 14, 2020, 10:18:14 amHe might try. However, nVidia is a fabless chip company, with no idea how to manufacture its own chips. This might make moving production a tad problematic.

author: TheNewLab
author_rank: Frequent Contributor
timestamp: September 14, 2020, 10:29:06 am
content: Quote from: tunk on September 14, 2020, 10:26:09 amOops, my bad, Head over there.
Extended Hamming Code - Page 1
Forum section: electronics / general

author: hamster_nz
author_rank: Super Contributor
timestamp: September 09, 2020, 09:27:21 pm
content: If you aren't familiar with Hamming Codes (a simple Error Correction Code, maybe the simplest?) you could do far worse thing wiht 40 minutes than watch this:Even if you are familiar it has a few interesting different perspectives on what is going on.
Oil Runtime Compiler:: SIMD! - Page 1
Forum section: electronics / general

author: 0db
author_rank: Frequent Contributor
timestamp: September 09, 2020, 01:13:04 am
content: QuoteI am compiling Firefox and I have just found this interesting compiler as dependencyUnfortunately I cannot find examples of real applications.

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 09, 2020, 11:36:00 am
content: I hadn't heard of it either. Looks interesting (sort-of-functional language), very highly abstracted, so it is rather interesting in that it can compile to SIMD machine code.Here (orc.csres.utexas.edu)is the Orc language main page for those interested.

author: coppice
author_rank: Super Contributor
timestamp: September 09, 2020, 01:15:45 pm
content: Quote from: Nominal Animal on September 09, 2020, 11:36:00 amThat is a different orc. The oil runtime compiler, and related liboil, can be found athttps://github.com/GStreamer/orc

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 09, 2020, 06:10:43 pm
content: Quote from: coppice on September 09, 2020, 01:15:45 pmWhat the fuck?(You're absolutely right, coppice; thanks for the correction.)Eww. One more reason to stay away from GStreamer folks. (One more group of developers who are completely unable to understand modularity, and instead insist on reinventing their own wheel and keeping everything inside their own framework.)
Apress sale - Page 1
Forum section: electronics / general

author: cheeseit
author_rank: Regular Contributor
timestamp: August 30, 2020, 05:38:38 pm
content: Just a heads up, and I'm not affiliated in any way. Halcyon: hope this is okay, if not please delete and accept my apology.Apress/Springer Nature has a big sale where almost every softcover or e-book costs €11.99. Purchase of a softcover includes temporary access to the e-book. I like e-books but very much prefer a physical book, even if it's softcover.https://www.apress.com/gp/shop/big-sale?token=biga20Apply the coupon code BIGA20 if not automatically included. Offer is valid through August 31, 2020.I have ordered 15 books since €11.99 is just too good. Mostly C, C++ and C# but a few on microcontrollers too. Savings on some are on the order of €50 with a combined saving north of €400 or so.

author: olkipukki
author_rank: Frequent Contributor
timestamp: August 30, 2020, 08:38:17 pm
content: Quote from: cheeseit on August 30, 2020, 05:38:38 pmWow, a lot!Why not spend $200 and subscribe to oreilly (ex Safari books) to get access to same books and another "10153 search results for C++" include videos, tutorials etc?

author: andersm
author_rank: Super Contributor
timestamp: August 30, 2020, 10:47:09 pm
content: I was amused to see that they're still trying to sell severely outdated books about e.g. Flash, ActionScript and Photoshop 7, but on the other hand there are also some preorders for upcoming books. The physical copies all seem to be print-on-demand. I did order a couple, so we'll see what their quality is like.

author: cheeseit
author_rank: Regular Contributor
timestamp: August 31, 2020, 06:54:28 pm
content: Quote from: andersm on August 30, 2020, 10:47:09 pmI received the first two today which were print-on-demand and, although I prefer hardcovers, they are fine. I too found it funny finding books I bought 10-15 years ago still on sale.Quote from: olkipukki on August 30, 2020, 08:38:17 pmAnother subscription and loss of access once I stop paying, right? I still have online access to books I bought 10-15 years ago, and copies on my shelfs. To each his own.
SCSI Linux - Page 1
Forum section: electronics / general

author: rckanta
author_rank: Contributor
timestamp: July 26, 2020, 06:45:09 am
content: How can I this data to the device from C program?I want to interface this device from Linux.I have used libusb(bulk) to send this data, unfortunately, device dint responded.And I don't have good knowledge of SCSI programming.I need help.Thank you in advance.
Run python script from POST command?! Raspberry PI - Page 1
Forum section: electronics / general

author: HiSmartAlarms
author_rank: Newbie
timestamp: July 02, 2020, 03:33:47 am
content: So, I had an idea to convert a project of mine from arduino to raspberry pi. The arduino version had a software controlling it, I wanted to do the same, but want it to be controlled via POST web commands (so that way it's not limited to my USB cable length). Is there anyway to make a python script run from when nginx recieves a POST command? (note i may not know what im talking about lmao)

author: greenpossum
author_rank: Frequent Contributor
timestamp: July 03, 2020, 10:53:20 pm
content: Is there a reason you want to run nginx as the web server? Search results show that running CGI scripts from nginx is more convoluted than if you run some other webserver like apache or lighttpd.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: July 05, 2020, 01:25:43 am
content: 1) Configure in nginx the path ("location") to proxy_pass to node-red and, 2) In node-red use the http request/response nodes and (say) node-red-contrib-pythonshell.Easy peasy, you can have it running in a sec.

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 05, 2020, 03:20:59 am
content: (I removed my post, because this is the wrong forum to talk about how to do IOT securely.)

author: Chris42
author_rank: Contributor
timestamp: July 08, 2020, 09:59:22 pm
content: I think the best option for you is to run a simple app in flask. It is a framework for creating server side software.Here is a quick hello world for POST request:Code:from flask import Flask, request, jsonifyapp = Flask(__name__)@app.route('/enableSkynet', methods=['POST'])def enableSkynet():data = request.json# here is your parameterparameter = request.json["parameterName"]print(parameter)As a body of the post request you pass a JSON encoded object containing whatever parameters you need.Here is how you write JSON:https://www.tutorialspoint.com/json/json_syntax.htmTo run the above code you need to install the following dependencies (available via pip):- flask- flask-jsonpify- flask-restfulFlask has a built in debug server that you can run by simply running your app script from a console.Once you are ready to deploy you can run flask on NGINX. Here is a link to a tutorial that demonstrates just that:https://www.raspberrypi-spy.co.uk/2018/12/running-flask-under-nginx-raspberry-p
Qt screenshot with multiple monitors - Page 1
Forum section: electronics / general

author: firewalker
author_rank: Super Contributor
timestamp: July 17, 2020, 09:27:40 am
content: I have a problem with a program using Qt to screenshot. I order to try and solve it my self, I had a look to the screenshot example:https://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.htmlDownloading and compiling the program, it works but only for the individual screens. In another posthttps://forum.qt.io/topic/65813/screenshot-secondary-monitorI saw that the line (screenshot.cpp line 170)Code:screen->grabWindow(0);Should be change toCode:originalPixmap = screen->grabWindow(0, screen->geometry().x(), screen->geometry().y(), screen->size().width(), screen->size().height());With this change when the program is moved to the secondary monitor; captures it just fine.When moved to the primary monitor it just capture only a part of the screen andnotthe entire two monitors. The produced image has the dimensions of the primary monitor.Exactly the same issue I have with the software I need to use.This is my monitor configuration:And this is my entire desktop capture with KDE Spectacle.What could be the issue?
Linear Algebra - lectures + programming resources - Page 1
Forum section: electronics / general

author: mrflibble
author_rank: Super Contributor
timestamp: June 04, 2020, 01:32:44 am
content: While looking for something SVD related, stumbled across this one. Semi-random sampling of relevant links:http://www.cs.utexas.edu/users/flame/laff/pfhp/week3-adding-cache-memory-into-the-mix.htmlhttp://ulaff.net/https://www.youtube.com/channel/UC-FlL9LPEipGNgaa1pS7aPg/videoshttps://hornraiser.utexas.edu/project/16114/wallIMO pretty useful, since it comes complete with the details that usually get glossed over in other courses.

author: aix
author_rank: Regular Contributor
timestamp: June 04, 2020, 05:55:46 am
content: Since we're talking linear algebra, I really enjoyed Gilbert Strang's lecture series on OpenCourseWare.Not sure if it covers the details you're after, but thought I'd mention it.

author: mrflibble
author_rank: Super Contributor
timestamp: June 08, 2020, 02:00:53 pm
content: Quote from: aix on June 04, 2020, 05:55:46 amYup, I like the lectures by Gilbert Strang as well.Might as well list the linear algebra videolectures for 2005, 2011 and 2018:And the OCW page for 2018:https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/And while we're at it, the linalg stuff by Steve Brunton (uni Washington) is also pretty good.For those interested he also has a lot of stuff related to compressive sensing, and things likeDynamic Mode Decomposition. Think "time evolution of compressed signal". More commonly known as"How do I not melt my GPU while doing a time series of that compressive sensing thingy?".Related playlist entries:And the somewhat older material on DMD:

author: Mattjd
author_rank: Regular Contributor
timestamp: June 09, 2020, 08:50:40 pm
content: Strang and Brunton are both good.If you like Brunton then you'll like Nathan Kutz from Uni Of Washington also. Brunton is part of Kut'z research group, as is Brunton's wife.I've read a few of their papers, and can say their book on Dynamic Mode Decomposition is good.
Unittest for C++ running on an AtMega32a - Page 1
Forum section: electronics / general

author: cedric!
author_rank: Contributor
timestamp: May 28, 2020, 02:17:02 pm
content: Hi All,I've made a workflow to unit test C code for an AtMega32a. I've used a combination of the C test framework "unity" and the AVR simulator "simavr". After I write the C code, I push it to a Gitlab server. The Gitlab server downloads and runs a docker container, installs gccavr, simavr to it, compiles the C code, and then runs the code in Simavr. Simavr pipes the messages from unity from the serial port to the console. When the tests are complete, the gitlab server sends me an e-mail with the results.http://www.throwtheswitch.org/unityhttps://github.com/buserror/simavrNow I would like to do the same, but this time with C++ code. I'm therefore looking for a C++ test suite that:a) Is written in C++, or can be called from C++ codeb) Runs on an AVRc) Can send it's messages to the serial port. (So I can run the code also in a real AtMega32a connected to a serial port of my PC)Do you know of such a suite?PS, I've also posted this question in the micro controller section, I'm unsure if this is the best place to ask this.Cheers,Cedric

author: PlainName
author_rank: Super Contributor
timestamp: May 30, 2020, 05:53:06 pm
content: CppUTest is similar to Unity but does C++. And C.https://cpputest.github.io/
esp32-arduino rmt bi directionnal - Page 1
Forum section: electronics / general

author: netmonk
author_rank: Contributor
timestamp: May 27, 2020, 07:25:00 am
content: Good morning,I started to develop a prototype of flight controller based on esp32.https://github.com/netmonk/esp-ecpcode is here.Currently im using gpio and rmt library to send dshot600 frame to control an esc and a motor.The transmission is currently one way from esp32 to esc.dshot protocol is a bidirectionnal protocol, where each dshot command sent from flight controller can request a telemetry answer from the esc, sharing the same wire.i would like to know if someone ever succeeded to use esp32 rmt library in dual way. it seems possible following the official documentation, but it seems far too advanced to have a official guide from esp32 forum.i try my chance here, may be someone have some piece of code to sharethank by advance.
(For Resin Printers) PrusaSL1Viewer - Open,view,extract, edit, convert SL1 Files - Page 1
Forum section: electronics / general

author: sn4k3
author_rank: Frequent Contributor
timestamp: May 04, 2020, 05:50:46 pm
content: PrusaSL1Viewer - Open, view, extract, edit and convert SL1 FilesOpenSourceFeaturesView image layer by layerView and extract thumbnailsView all used settingsEdit print properties and save fileExport file to a folderConvert SL1 format to another formatPortable (No installation needed)For the lack of redudancy i'm not replicating the information on the post, if you have the interest read github page:https://github.com/sn4k3/PrusaSL1ViewerReleases:https://github.com/sn4k3/PrusaSL1Viewer/releases

author: AndyC_772
author_rank: Super Contributor
timestamp: May 04, 2020, 06:15:24 pm
content: It's probably worth mentioning that .SL1 files are actually .ZIP files containing each layer as a .PNG.If you want to see what's inside, all you need to do is rename the .SL1 to .ZIP and explore away.

author: sn4k3
author_rank: Frequent Contributor
timestamp: May 04, 2020, 06:21:28 pm
content: Quote from: AndyC_772 on May 04, 2020, 06:15:24 pmLike Zortax they are zip, but the main objective of this software is convertion to another format. So you can use prusa slicer and export the file to your printer without the need of reslice in the target slicer. It allow modify parameters without the reslice. While you can do that manualy it's easy to mess or miss something inside the zip. While that is true for zip, you can't do the same by hand on binary formats (.photo, .cbt, .cbddlp)

author: sn4k3
author_rank: Frequent Contributor
timestamp: May 19, 2020, 04:06:02 pm
content: New version 0.3.3:https://github.com/sn4k3/PrusaSL1Viewer/releases/tag/v0.3.3(Add) PHZ file format(Add) "Phrozen Sonic Mini" printer(Add) Convert Chitubox files to PHZ files and otherwise(Add) Convert Chitubox and PHZ files to ZCodex(Add) Elapsed seconds to convertion and extract dialog(Improvement) "Convert To" menu now only show available formats to convert to, if none menu is disabled(Fixed) Enforce cbt encryption(Fixed) Not implemented convertions stay processing forever
How do you manage large collections of unrelated Linux code and documentation?  - Page 1
Forum section: electronics / general

author: cdev
author_rank: Super Contributor
timestamp: May 08, 2020, 06:09:52 pm
content: How do you organize your code collections, to make it easier to go to stuff quickly, and get the best use out of it?I have a huge collection of software, documentaion, etc. that is in various kinds of version control systems (mostly git) as well as tarballs in directories, PDF files, HTML documentation, etc. I'd like to know how other, far more organized people than me handle similar situations. Currently, I use git solely as a consumer and not as an author of software, but that may change in the future, But for now I just want to consolidate related files and make the documentation easier to read, possibly with the help of my desktop machines web server installation (just for the local machine) What I would really love is a tool that could walk a tree of literally hundreds of miscellaneous git directories, identify the ones that have updates and "git pull" them automatically, if desired (while leaving others alone) Does such a tool exist?I would say that 3/4 of the software I download never gets compiled, much of it I never even have time to look at, other stuff I do but never build it, or sometimes it fails to build on my machine because of some issue and I just put it aside for later.. Often they do build successfully and currently I either run them from the build directory and if it seems like something I want to install I use /usr/local or my home directory to install them. Sometimes I need to use non-default libraries etc, so then I have to link against a local copy.I find myself fantasizing about having two sparate machines and figuring out how to build and a good plan to instal stuff on one machine and using the newer machine only when I know how I'm going to do it. I shouldnt have to do that.(ahh, I just answered my own question, I suppose one good answer is, package my builds using the Debian package manager, make debs out of packages I like, that would solve the problem, then I could also share them)Also, how do you lay out folders, to mentally organize them? I'm not going to die if I cant do this but I am also trying to make it easier for others to understand when I have somebody over and I am trying to show them something. Right now its embarassingly disorganized.

author: MK14
author_rank: Super Contributor
timestamp: May 08, 2020, 07:02:49 pm
content: Quote from: cdev on May 08, 2020, 06:09:52 pmUse VMs, on your single machine, to make "new" computer (VM images). Which you can then customise to suit the make/compiling processes, and not need to worry about messing them up.With little/no fear of damaging or infecting, your main computer.
VB Net 2019 - Using:  string.{TrimEnd(charsToTrim) - Page 1
Forum section: electronics / general

author: NY2KW
author_rank: Regular Contributor
timestamp: April 18, 2020, 06:13:12 pm
content: I am learning VB Net 2019. My program searches (with NI-VISA) for all available instrument types as selected by user. Based on checkboxes selected I build a resourceString in a NI-VISA format where the abbreviations that NI-VISA expects are ASRL, GPIB, TCPIP, USB. The resourceString expects these types to be separated by the ' | ' character and I need to strip off the last ' | ' and then terminate with a string of "?*"I have Option Strict On as I was told to learn VB NET this wayCode:Dim resourceString as String = "ASRL|GPIB|TCPIP|USB|" 'for debugging i use a string with all resources as they would be addedDim charsToTrim() As Char = {"|"}Dim temp As String = resourceString.TrimEnd(charsToTrim)resourceString = temp + "?*"I get an error : on the 3rd line with the ' | ' : Error BC30512 Option Strict On disallows implicit conversions from 'String' to 'Char'.Is my only option to turn off Option Strict?

author: TomS_
author_rank: Frequent Contributor
timestamp: April 19, 2020, 06:50:53 am
content: Presumably it still thinks your character is a string.Looking at the documentation for TrimEnd (https://docs.microsoft.com/en-us/dotnet/api/system.string.trimend?view=netframework-4.8), perhaps try this:Code:Dim charsToTrim() As Char = {"|"c}Or:Code:Dim temp As String = resourceString.TrimEnd("|"c)Or maybe even:Code:resourceString = resourceString.TrimEnd("|"c) + "?*"

author: gbaddeley
author_rank: Regular Contributor
timestamp: May 07, 2020, 01:35:12 pm
content: How about changing the way “|” are used in the string, putting them before each value rather that after. The trim end is no longer required. Just take the SubString from offset 1 onwards, and append the trailing sequence.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 08, 2020, 07:28:58 pm
content: If you must have a trailing "|", another method is to declare resourceString as an array containing the strings "ASRL" etc, and then use the string.join class to create your output. So...output = string.Join( "|" , resourceString ) + "?*"ASRL|GPIB|TCPIP|USB?*You can change the seperator to any string value.https://docs.microsoft.com/en-us/dotnet/api/system.string.join?view=netcore-3.1Or use the regular expression RegEx.replace class to strip the trailing character - if present. But regular expressions are a little overkill for your task.https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expressions
Compile time object contruction in C++ - Page 1
Forum section: electronics / general

author: westfw
author_rank: Super Contributor
timestamp: April 27, 2020, 12:37:10 am
content: Suppose that I have an object like a "command", which gets put together into a linked list, with each "object" containing a text string, a function pointer to the action routine for that command, and a pointer to the next command.Then in C++, I can sprinkle these around my source code as appropriate a global objects, and the constructor can link them all together.Code:class cmd_t {private:static cmd_t *head;const char *text;void *(*func)(char *);cmd_t *next;public:cmd_t(const char *t, void*(*f)(char *)) {text = t;func = f;if (head == NULL) {head = this;} else {cmd_t *p = head;while (p->next != NULL) {p = p->next;}p->next = this;}}}cmd_t add("add", add_f);cmd_t sub("sub", sub_f);cmd_t mul("mul", mul_f);Now, that's all stuff that COULD happen at compile time, I think. But it doesn't, even with "-Os -flto"Is there any way to convince the gnu C++ compiler to MAKE it happen at compile time? Extra credit if things can be "const" enough to end up in flash on a microcontroller.(I tried adding some const and static qualifiers in essentially random places, which resulted in behaviors ranging from "no change" to "compile errors."(full compileable source attached.)

author: greenpossum
author_rank: Frequent Contributor
timestamp: April 27, 2020, 12:50:44 am
content: Why not write a script in your preferred language to spit out a C file with a list of class instances and intialisations?
Install Official Google Chrome OS on PC / Laptop With Play Store and Linux! - Page 1
Forum section: electronics / general

author: Kedar264
author_rank: Regular Contributor
timestamp: April 21, 2020, 12:16:35 pm
content: Hey Guys, Today in this video I am going to install full fledged chrome os on pc / laptop that has Google play store inbuilt and has linux crostini support, chrome sync, Google assistant and many more exciting features.https://youtu.be/4gZYV0RWJQ8it is highly recommend to watch the video for all the detailed steps*Credits* Special thanks to the Developer sebanc from Paris, France who helped me a lot.https://github.com/sebanc**Download Links**1) Linux Minthttps://www.linuxmint.com/download.php2) Rufushttps://rufus.ie/3) Brunchhttps://github.com/sebanc/brunch/releases4) install.shhttps://raw.githubusercontent.com/shrikant2002/Ch...5) Official Chrome OS recovery image (rammus) choose the latest one herehttps://cros-updates-serving.appspot.com/or direct link for rammus recovery r80 version (extract it and rename it "rammus_recovery.bin")https://cros-updates-serving.appspot.com/if the above link is down you can download from herehttps://sites.google.com/view/brunch-projectMake sure to download all files and extract or rename as per details.for step by step details check out .https://youtu.be/4gZYV0RWJQ8https://www.instructables.com/id/Install-Official-Google-Chrome-OS-on-PC-Laptop-Wit/

author: bingo600
author_rank: Super Contributor
timestamp: April 25, 2020, 05:24:01 pm
content: Did the reverseModding a Chromebook Bios , in order to "Set it free" , and load linux on it.Made much more sense to me./Bingo
Query the compiler to determine how many elements in const String array - Page 1
Forum section: electronics / general

author: ornea
author_rank: Unknown
timestamp: April 13, 2020, 04:39:12 am
content: Is it possible to query the compiler to determine how many elements in an const String array or do I need to manually count them.In Arduino with a esp8266 target i declare this 2D const String arrayCode:const String strButtonStates[] {{"Jerky Dryer", "Yogurt Maker", "Egg Incubate", "Black Garlic", "Solder Reflow", "Solder Iron"},{"Toggle Scale &#176;C", "Toggle Scale &#176;F"},{"Run PID Loop", "Forced High", "Forced Low", "Forced MCV"},{"Active High", "Active Low"},{"Inject Water", "Auto Humidty", "Water Inhibit"},{"Active High", "Active Low"},{"Save State"},{"Reset Restart"}};I would like the compiler to tell me that there are 6 elements in the first array 2 in the second and so on.something like this would be niceint n0 = sizeof(strButtonStates)but it always returns 12Perhaps there is a better way entirely that saves me having to define another array like thisCode:byte buttonStates = {{0, 6},{0, 2},{0, 4},{0, 2},{0, 3},{0, 2},{0, 1},{0, 1}};The first column records the current user selection, the second column records how many options there are for that button.Any ideas or suggestions warmly welcome.Ornea

author: greenpossum
author_rank: Frequent Contributor
timestamp: April 13, 2020, 05:15:14 am
content: I don't think so. The compiler doesn't provide a way for you to access that. If you are willing to use more names, you can do this:const String choices1[] = {"Jerky Dryer", "Yogurt Maker", "Egg Incubate", "Black Garlic", "Solder Reflow", "Solder Iron"};const String choices2[[ = {"Toggle Scale °C", "Toggle Scale °F"};...then you can write:const String *strButtonStates[] = {choices1,choices2,...};and their respective lengths are (sizeof choices1/sizeof choices1), etc.More indirection and names but less waste of uninitialised elements.

author: magic
author_rank: Super Contributor
timestamp: April 13, 2020, 10:55:12 am
content: Quote from: ornea on April 13, 2020, 04:39:12 amThat's surprising, it should return sizeof(String)*10. In fact, I just tried it (with std::string) on my system and got just that.The reason is because each of the arrays is indeed 10 elements long and each element is a String object of fixed size. The Strings which aren't initialized end up containing NULL pointers or some similar dummy values inside, but they still exist.A possible solution is to replace the arrays with std::vectors, if that's available on Arduino. These contain only the explicitly initialized elements and know their length.
Barcodes (Tassimo) - Page 1
Forum section: electronics / general

author: Sounduser
author_rank: Contributor
timestamp: April 08, 2020, 02:22:08 pm
content: Has anyone figured how the tassimo coffee machine bar codes work?The only thing that ive found online is this:https://wiki.mbirth.de/know-how/hacking/tassimo-barcodes.htmlBut its kind of helpful. Many dead links around.....If I make up a 13 bit binary number, convert it to decimal and then enter it into a free bar code creator ( 2 of 5 bar code with a check sum)(http://generator.onbarcode.com/online-interleaved-25-barcode-generator.aspx). The machine will read it. But I cant figure out exactly what bits mean what? I think maybe they're doing the check sum slightly different and making my results not tally?Binary Decimal Expected result Actual result11 00 0000 000 00 6144 061445 50ml 55ml - warm11 10 0000 000 00 7168 071680 50ml 120ml - warm11 11 0000 000 00 7680 076870 50ml 95ml - warm11 01 1000 000 00 6912 069120 150ml 185ml - warm11 00 1100 000 00 6528 065283 230ml 115ml - warm11 00 0110 000 00 6336 063364 110ml 120ml - 50ish11 00 0011 000 00 6240 062404 80ml 75ml - 50ml11 00 0001 100 00 6192 061926 60ml 70ml - 50ish11 00 0000 110 00 6168 061681 50ml 75ml - 50ish11 00 0000 011 00 6156 061568 50ml 70ml - 50ish11 00 0000 001 10 6150 061506 50ml 60ml - 50ish11 00 0000 000 11 6147 061476 50ml 60ml - 50ish11 00 0000 000 01 6145 061452 50ml 65ml - 50ish11 00 1111 000 00 6624 066242 300ml 235ml - warmAll 1111111111111 was lots of hot water.All 0000000000000 was the only code that would read.Anyone messed with this before? Any ideas?Cheers.

author: Sounduser
author_rank: Contributor
timestamp: April 08, 2020, 03:03:10 pm
content: Its definitely doing the check sum differently.a Kenko Americano is 297615 (70 degree c 220ml ish)Online bar code creators add a digit to the start and end.So I was expecting, 9761 was the significant numbers. Adding those digits into the creator gave a number of 097611. which should have given me the same results, but I got 35ml of 45 degree c water.
Windows program for intercepting and generating keyboard events with Lua - Page 1
Forum section: electronics / general

author: FrankBuss
author_rank: Unknown
timestamp: April 03, 2020, 07:53:32 am
content: I just wrote a scriptable Windows program for an application Dave mentioned on Twitter. The Australian Post 2D barcodes contain a lot more digits than just the tracking code. The barcode scanner acts as a keyboard and sends the digits as keyboard events. With my application it is possible to intercept the digits and forward just the tracking ID, which is part of the long number. Here is the project:https://github.com/FrankBuss/LuaKeyboardHelperThe sample script should work for Dave. Might be improved by detecting a start char, because now it works with timeouts, which delays normal digit inputs. But can be improved in script.lua by lowering keyTimeout. It can be used for other tasks as well, and the C++ program is easy to extend to do other things from the Lua script.
How can I customise a mouse driver? - Page 1
Forum section: electronics / general

author: 741
author_rank: Frequent Contributor
timestamp: April 02, 2020, 08:10:06 am
content: Whilst I do not expect to get something through WHQL, it would be nice to have a go at this. For example I saw someone had captured the camera image from a mouse.I seem to recall there is something privileged about mouse & keybaord drivers, this could be because breaking one of these drivers would make the PC hard to use.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 11, 2020, 11:52:06 pm
content: I dont think its anything to do with making the computer hard to use (although that could certainly be a side effect), but the fact that talking to hardware usually means poking at memory, which has security implications and is probably the bigger concern.As for capturing the image from an optical mouse sensor, I doubt youre going to achieve that with a stock standard mouse. A mouse isnt designed to work as a camera in the traditional sense, so probably doesnt contain the ability to ship its images off to the PC, just information about movements.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: April 12, 2020, 12:14:36 am
content: Yeah, I remember seeing images like that in the early 2000s, but they were probably captured by an engineer interfacing directly with the image sensor. Following the never-ending trend towards tighter integration, you'd expect that today the sensor has processing logic built in and just outputs a motion vector.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 11, 2020, 09:48:21 pm
content: Quote from: I wanted a rude username on April 12, 2020, 12:14:36 amYes they do. They already did back then too, as these mice work via generic and standardized HID interfaces.But some have the option to output the raw image data too for debug purposes.For stuff like this you're usually best of with some Linux Distribution.Also, it took me about 2 minutes to find such pictures (and websites with more info).
ATMEGA328P U defult firmware - Page 1
Forum section: electronics / general

author: foxhole99
author_rank: Newbie
timestamp: March 10, 2020, 02:56:53 pm
content: I have an ATMEGA328P U that I messed up the programing for. I wanted to get the default firmware on it. Is there a download to a .bin file that I can use my TL866II Plus to reprogram it? I'm new to this so I'm not sure if that's what I need. I used an Arduino Uno, I have that chip on the board but I can't upload any sketches to it.Edit. before I started messing with it I did do a backup. or thought I did a backup of the chip. I tried to reload the "backup" but nothing seems to be working.

author: TK
author_rank: Super Contributor
timestamp: March 10, 2020, 03:06:15 pm
content: If the chip is from an arduino uno board or compatible, it has a bootloader called optiboot that can be reprogrammed using another arduino or an avr programmer. If by default you mean the arduino sketch, originally only has a sketch that does some sort of self test and blink the onboard LED.

author: DrG
author_rank: Super Contributor
timestamp: March 10, 2020, 06:41:20 pm
content: Quote from: foxhole99 on March 10, 2020, 02:56:53 pmCould be a number of things. I would suggest that you consider reprogramming the fuses since you have a TL866II which can do HVPP - right?LOTS of info when you search for Bricked Arduino.Hope this helps.

author: foxhole99
author_rank: Newbie
timestamp: March 10, 2020, 08:19:55 pm
content: I do have the programmer. Let me do some searching

author: TK
author_rank: Super Contributor
timestamp: March 10, 2020, 09:19:28 pm
content: The UNO bootloader is distributed with the Arduino IDE. You can find under the Arduino installation folder (directory). The firmware has the .hex extension, and you need to google also for the right fuses to set and also the protection fuses to avoid erasing the bootloader in the future.
Tl866 prom programmer bricked, Intel 2716 - Page 1
Forum section: electronics / general

author: jonpaul
author_rank: Super Contributor
timestamp: February 14, 2020, 04:59:50 pm
content: Bonjour à tous,Years ago I bought the MiniPro Tl866 programmer, and used it for years mainly with the Dallas Semi NVRAM.Today I had to read the code of a 1977 cipher machine, an Intel 2716, but the reader fails to see the prom.Same with other similar parts.I made the mistake of updating the firmware!Now its bricked "pirated" serial not valid" even though it is the genuine original model.I found the proceedure to update to the tl866A version, same result.Seems like a Chinese scheme to brick old units abd generate new sales?Any assistance appreciated, as the programmer is urgently need for some historic research of my non-profit organization.Perhaps just a valid serial number? Or defective update file?Mille mercis pour votre gentil aide !Jean-Paul

author: kripton2035
author_rank: Super Contributor
timestamp: February 14, 2020, 05:11:34 pm
content: some "modern" arduino solution ?https://www.element14.com/community/blogs/SalsCorner/2015/07/27/eprom-reader-projector alsohttps://danceswithferrets.org/geekblog/?p=315

author: jonpaul
author_rank: Super Contributor
timestamp: February 15, 2020, 09:40:12 am
content: Hello Kripton: Many thanks I am NOT a software maven and last programmed in 1964 on IBM 360, Fortran II!As I have the MiniPro and the HW is fine, I am looking for any one else with this device and any possible solutions. Lots of others have the same issues, as its $50 and very popular.Kind Regards,Jon

author: kripton2035
author_rank: Super Contributor
timestamp: February 15, 2020, 10:28:37 am
content: did you try the "dangerous method" of this post :https://www.eevblog.com/forum/blog/eevblog-411-minipro-tl866-universal-programmer-review/msg383943/#msg383943did you also try the method (some posts after) with soldering a resistor to force update mode ?

author: kripton2035
author_rank: Super Contributor
timestamp: February 15, 2020, 10:32:46 am
content: you can also use this :https://github.com/radiomanV/TL866there is a method to generate a new serial.
B4A (Basic4Android) is now free - Page 1
Forum section: electronics / general

author: spudboy488
author_rank: Regular Contributor
timestamp: February 06, 2020, 12:49:22 pm
content: B4A is a RAD tool for developing Android software. It is similar to Visual Basic with a lot of the same syntax and structure. It hides all the JAVA in an easy to use package. The development software has just been made free to use. It appears to be the full version and is not limited in any way.Link:https://www.b4x.com/b4a.htmlThey also have a free B4J, Basic4Java, to develop desktop apps and a free B4R to develop Arduino software. Both is the similar Visual Basic like interfaceB4J:https://www.b4x.com/b4j.htmlB4R:https://www.b4x.com/b4r.htmlI have been using (and paying for) B4A for years and have a no other affiliation to the company. It is highly recommended.
TL866II XGPro Programmer: "IC List DLL File Error!" - Page 1
Forum section: electronics / general

author: T-SquaredProductions
author_rank: Newbie
timestamp: February 03, 2020, 09:32:22 pm
content: I've decided to move on from my TL866CS programmer, partly because it doesn't support ICSP.Now I have a new problem. The DLL file containing all of the ICs does not work, and I assume it is caused by bad programming, according to this:http://www.nullsecurity.org/article/minipro_reverse_engineering_the_infoic_dllI've tried to use a few changes, or even roll back to an older version, but my Windows XP rig will not accept it.Is there any way to get this to work?I really need this, not just for chip programming, but also to get my Arduino-powered 3D printer back up and running again. (Hence why I need ICSP)

author: Postal2
author_rank: Frequent Contributor
timestamp: February 04, 2020, 02:43:21 am
content: Hi. I have TL866CS too, but I never tried to update this. I think you choose a hard way,resulting to errors in chip-programming. Because TL866 has protection from hackers.I'm using my own programmer instead, that in the neighbour topic. All 8-bit AVR is easily supported. You can DIY it and get a big enjoy.All you need is Arduino mini-board with any usb-uart bridge, I will provide help to you step by step and this will be tutorial fof others.
Convert Excel output to chip programmer write buffer? - Page 1
Forum section: electronics / general

author: bklein
author_rank: Contributor
timestamp: January 03, 2020, 05:27:51 am
content: I am not a software guy so I was trying to use Excel....My challenge is to program 200 EEPROMs - each with a unique MAC address.So I need something to take the MAC address, put it in the right place along with the surrounding data, and create a checksum based upon the sum of all data, twos complement, plus 1 (or something like that). Also the write buffer I saw had a checksum for each line in the buffer as well.So I managed to create an Excel file that did this - after the MAC address is entered, the remaining checksums are created and the spreadsheet is laid out like the write buffer file should be (address, data, checksum each row). I have correct column widths for the address, and data/checksum fields.Now the challenge is to output to a binary file or whatever for the chip programmer to accept. This is the gotcha.I don't find hex editors that take CSV files.I feel like I'm missing something really simple but I ask around and no one has an idea except to start over and do it all in a programming language like C.Ideas?

author: SparkyFX
author_rank: Frequent Contributor
timestamp: January 03, 2020, 06:59:35 am
content: I created something like this in Excel. It writes binary data (based on the content of the spreadsheet) to a file, which then in turn gets included in a project that is written to some flash chip using the programmer. All is called from a VBA macro inside the document.Press Alt+F11 to create a new VBA module in the file, go from cell to cell, convert the data, write it out to a file and this should do it.The interesting parts of the code look like this:Code:filenum = FreeFileIf Dir(file) <> "" ThenSetAttr file, vbNormalKill (file)End IfOpen file For Binary Access Write As #filenumSeek #filenum, 1For a = LBound(data) To UBound(data)by = CByte(data(a))Put #filenum, a + 1, byNext aClose #filenumwhere file is the filename with path, data an array containing the bytes.