hybridfree/eevblog-posts huggingface dataset:
How do PIC32 ISR / Interrupts work? - Page 1
Forum section: electronics / general

author: 741
author_rank: Frequent Contributor
timestamp: February 18, 2022, 07:48:42 pm
content: Hi,I'm new to PIC32. I'm trying to understand how the ISR process works, and how one can use the PIC32 scheme effectively.This is how I currently see things -Ignoring sub-priorites and natural priorities for now - It looks like that there are 2 places where interrupt priorities 'meet' - First the IPCx registers, external to the CPU core, can be configured to any level up to 7.When an event occurs, the ISR 'vector' (address) is jumped to. The ISR code itself sets up what priority it operates at via IPLx.If the IPCx priority is level 3 then the ISR code can in principle set IPL to 2 or lower - but that would be diastarous as then the same interrupt will keep firing the ISR.So in practice it is common to set IPLx to the same value as IPCx [IPLx = IPCx] - but it could be the ISR sets IPLx to a higher priority [IPLx > IPCx] - not sure why this would be useful though.

author: TomS_
author_rank: Frequent Contributor
timestamp: February 19, 2022, 08:58:47 am
content: Not 100% sure what the question is, but have you seen Section 8 of the Family Reference Manual? This covers interrupt processing.

author: 741
author_rank: Frequent Contributor
timestamp: February 20, 2022, 06:16:03 pm
content: Yes - I had a look at section 8. However I am not sure I understood it properly, hence this post.My questions:Is my description correct as far as it goes?What is an example of where it is useful that the ISR sets IPLx to a higher priority than IPCx?The new feature for me - if my understanding is correct - is that the ISR can dynamically select its interrupt level.It looks like, for example, an ISR does not necessarily get serviced "at" the same priority as the hardware interrupt.I think that for 8 or 16 bit PIC, the only way for an ISR never to be (itself) interrupted is either(a) If there are priorities(b) If priorities are used, and if the ISR is not at maximum priority - disable all interrupts (GIE=0) when the ISR startsIt looks like the PIC32 offers a more sophisticated mechanism - I can choose the priority at which my ISR works?
Any Suggestions on More Implementation Methods - Page 1
Forum section: electronics / general

author: sarahparker
author_rank: Newbie
timestamp: February 22, 2022, 01:19:40 pm
content: Hey folks,So was solving some Python-related problems for practice.Problem Statement: Convert list to string in PythonHere's my Implementation:Method 1,Method 2Was wondering if there are any other approaches to solving the problem?Any input would be appreciated. TIA..!
Half-Life and HL:OpposingForce - free open engine and game for Ubuntu or FreeBSD - Page 1
Forum section: electronics / general

author: RoGeorge
author_rank: Super Contributor
timestamp: February 03, 2022, 02:30:14 pm
content: It is possible compile and play the "Half-Life" and the "Half-Life: Opposing Force" games in Linux or in BSD, for free, and without any Steam account. No WineHQ required.The game looks just like the original, but it is using an open source version of the game engine, and the Valve's maps were released, too, so it is OK to compile and play it (from the licensing standpoint - see the next link for more info about licensing). This is not a cracked game.Found out about the Open HL fromhttps://forums.freebsd.org/threads/half-life-in-4-easy-steps.80394/------------------Generic info about the game(s):https://en.wikipedia.org/wiki/Half-Life_(video_game)https://en.wikipedia.org/wiki/Half-Life:_Opposing_Force------------------To compile and play in Ubuntu 20.04 LTS:Code:sudo apt install xorg git libfreetype-dev libfontconfig1-dev libsdl2-dev mono-complete cmake pkgconf# - in Debian, csc is known as mono-csc, a symlink to /usr/bin/msc# the 'csc' name might conflict with another package, 'chicken-bin'# usually, 'chicken-bin' is not preinstalled# - create a 'csc' symlink to the '/usr/bin/msc', so to keep the same build.shcd /usr/binsudo cp -s /usr/bin/mcs csccd ~git clone https://github.com/osen/openhl.gitcd openhlPYTHON=python3 sh build.sh# if the compilation fails, fix the errors, delete the 'export' directory# then run only this line again. Do not start anew and do not git clone again,# because that is not necessary and the repository is very big (~300MB)# for Linux, the .so names has to be changed from libclient/libserver to client/hlsed -i 's/libclient\.so/client\.so/' export/bin/hlsed -i 's/libserver\.so/hl\.so/' export/bin/hlsed -i 's/libclient\.so/client64\.so/' export/bin/opforsed -i 's/libserver\.so/hl64\.so/' export/bin/opfor# to run the Half-Life gameexport/bin/hl# to run Half-Life: Opposing Forceexport/bin/opforThe directory "export" is portable, once built it can be moved and the games are self-contained, can be run from anywhere. Tested in 4k on an Ubuntu 20.04 LTS + KDE Plasma (i7/nVidia).------------------To compile and play in FreeBSD 13.0-RELEASE:Code:# pkg install xorg git sdl2 mono cmake pkgconf$ git clone https://github.com/osen/openhl.git$ cd openhl$ PYTHON=python3 /bin/sh build.shTo play Half-Life$ export/bin/hlTo play Opposing Force$ export/bin/opfor
Codium is Visual Studio Code without the Microsoft proprietary settings - Page 1
Forum section: electronics / general

author: RoGeorge
author_rank: Super Contributor
timestamp: May 10, 2022, 08:43:00 pm
content: Microsoft's VScode is, IMHO, the best IDE out there. It is also free and open source.However, when the git sources are turned into binary installers, Microsoft adds its own custom settings, settings that are not included in the public git repository. Of course, advanced users can always compile their own VScode started from sources, but this is time consuming and requires very specific settings.Codiumis Visual Studio Code, but with community maintained default settings, and community prepared installers, no Microsoft defaults. Same functionality but with less distractions, telemetry disabled, and so on:https://gitlab.com/paulcarroty/vscodium-deb-rpm-repoFor example, to install Codium in Ubuntu:Code:wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | sudo apt-key add -sudo apt-add-repository 'deb https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main'sudo apt updatesudo apt install codiumVSCode extensions fromhttps://marketplace.visualstudio.com/VSCodework with Codium, too. For example, to add Python IDE functionality, install the ms-python extension:https://marketplace.visualstudio.com/items?itemName=ms-python.pythonTried Codium in the last couple of days as a Python IDE (with the ms-python extension), and it worked very well but with less bloatware. For example, when installed the same extension,ms-python, VScode also installed Pylance, which I didn't need, while Codium installed only the needed dependencies for ms-python.

author: eugene
author_rank: Frequent Contributor
timestamp: May 10, 2022, 11:14:29 pm
content: I have not yet tried it, but the concept is awesome. I dream of a similar effort with Android.

author: eugene
author_rank: Frequent Contributor
timestamp: May 10, 2022, 11:23:14 pm
content: Looking at the installation instructions on gitlab, I find this concerning:Code:sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpgThere is an alternative apt installation (as described by RoGeorge.)
[solved]GPX file with points every second. Too many. Need every 3s or 4s instead - Page 1
Forum section: electronics / general

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: January 24, 2022, 11:29:57 pm
content: Do you know how to use gpsbabel to make it drop the number of points in a gpx file to a minimum time not maximum?Target program is suffering indigestion. Needs points spaced out to 3 or 4 seconds (and drop any in between)The position,time=x param isn't what I want.Found this. Someone asked the same thing. Didn't provide a solution tho.https://sourceforge.net/p/gpsbabel/mailman/gpsbabel-misc/thread/FF91E642-5E22-46BC-9BD9-15085B53DE4F%40mac.com/#msg28161398

author: ve7xen
author_rank: Super Contributor
timestamp: January 25, 2022, 12:05:54 am
content: The 'resample' filter was added in gpsbabel 1.8.0 released a few days ago. Not exactly what you're asking for, but allow you to reduce the sample rate by a factor (decimate).

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: January 25, 2022, 12:11:36 am
content: Quote from: ve7xen on January 25, 2022, 12:05:54 amThanks. Will check it out.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: January 25, 2022, 03:44:34 am
content: Finally got it to do what I wanted.I had to basically run two passes because I was using track,fix=3d as well as the position,time=3, prolly because the input file came from a multi day, multi gpx file abomination.New and previous version produced byte for byte outputs. v1.8.0 vs v1.7.0For anyone who cares:gpsbabel v1.8.0 (linux) now uses qmake and no longer ./configure && makehttps://www.gpsbabel.org/htmldoc-1.8.0/Source.html
Communication between iOS App and linux IOT device ? - Page 1
Forum section: electronics / general

author: CookieMonster
author_rank: Contributor
timestamp: January 01, 2022, 04:56:19 pm
content: Hi,i'm looking for some reading material on the subject of iOS apps to communicate with linux based embedded (IOT) devices.I have found some material that explains how to use websockets for this purpose, but i'm looking for more comprehensive examples, eg. on how to find devices automatically on the network.All examples i've found so far are either hardcoding or prompting for the host url.It would be great if anyone could give me some pointers, articles or example projects to take a look at.Thanks!

author: Cerebus
author_rank: Super Contributor
timestamp: January 02, 2022, 12:07:37 am
content: Look for things on "Bonjour", "Multicast DNS" (MDNS), and "Service Location Protocol" (SLP).
How to Compile NanoVNA-QT Source Code from Qt in Windows? - Page 1
Forum section: electronics / general

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 08, 2021, 02:01:01 pm
content: reference:https://github.com/nanovna-v2/NanoVNA-QTthe compilation steps only available from Linux/iOS, but none for from Windows.. since my guess its developed in a way that Qt compatible, it must be possible to compile it from Qt Designer / Qt Creator. but project file linking them all is not available in the github source code, they are all scattered source code files that i dont know the correlation, which one is first, and which one connected to which... so can someone guide on how to compile this in Windows Qt-Creator/Designer? or at least guide me on how to manually handcraft the project file to link them all together? thanks.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 08, 2021, 05:57:49 pm
content: For Windows builds, they give a way to do this as a cross compile from Linux. If you have a Linux box, that's the easy way of generating Windows binaries.You can alternatively try building it using MSYS2 on Windows.

author: newbrain
author_rank: Super Contributor
timestamp: December 09, 2021, 07:45:53 am
content: Quote from: SiliconWizard on December 08, 2021, 05:57:49 pmIf you don't have a Linux machine but have Windows 10 or later, I would definitely try with WSL.For this kind of purely userspace, not network related tasks that's probably much easier than other alternatives.

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 10, 2021, 02:45:47 am
content: I use win7 and no linux box.. i saw the compilation command sort of seeking eigen3 and ifftr library iirc from i dont know where, not in the source code.. so this complicate things.. maybe i'll wait for a pc to install linux in.. i'll study msys2 later..thanks guys.
Anyone with Windows XP driver development experience - Page 1
Forum section: electronics / general

author: perdrix
author_rank: Frequent Contributor
timestamp: November 26, 2021, 04:33:39 pm
content: Specifically for a HID filter driver...In UK near Kenilworth would be idealThanksDavid

author: NorthGuy
author_rank: Super Contributor
timestamp: November 30, 2021, 03:46:34 pm
content: Windows XP has built-in HID drivers.

author: hgl
author_rank: Regular Contributor
timestamp: December 01, 2021, 04:06:09 pm
content: You need the Windows driver kit. Either the old DDK or the newer WDK. WDK is much simpler and works on XP with service pack 3. Both kits contain examples of drivers.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 01, 2021, 06:54:43 pm
content: Fun replies so far.@NorthGuy: Yes, but filter drivers are drivers that are designed to act on top of a base driver. If the OP wants an HID filter driver, they probably want to support a peripheral that has HID class, but need custom behavior on top of HID. That's the point of a filter driver.@hgl: That'll be good to know for people willing to do it themselves, but as I understand, the OP is looking for someone to do it. Either because they have no time to, it's not their job, they don't know how to, or whatever else.So @perdrix: That's something I could have done a few years ago, I've written a couple Windows drivers in the past, from Win 95/98 to Win 7. But not the kind of things I do anymore, and I'm not in the UK either. So good luck.
Web site to check whether an app is built with Electron? - Page 1
Forum section: electronics / general

author: Zbig
author_rank: Frequent Contributor
timestamp: December 21, 2021, 12:58:16 pm
content: Code:--- Strongly opinionated "Old man yells at cloud"-style rant begins here ---I hate Electron "apps"*)with passion. Most of the times when I invest my time to research and try some new thing all the kids are raving about only to find out it's built with Electron, I consider it a time wasted and promptly uninstall the thing not to stink up the place for other real apps. If only I had known in advance... Is there a website somewhere made by some fellow mad hater to quickly look up an application and simply tell "Yup, it's Electron" or "It's clean"? And if not, should I consider making one? The list athttps://www.electronjs.org/appsis not complete and I often find myself burned with stuff that's not listed there.*) I use the term "app" here loosely as I refuse to acknowledge these artifacts as actual applications. These are websites with a desktop icon as far as I'm concerned.

author: AntiProtonBoy
author_rank: Frequent Contributor
timestamp: December 22, 2021, 03:22:39 am
content: Just download and run? You'll find out soon enough. But I totally understand your gripe with Electron apps.
GitHub cloning online directly between two GitHub accounts - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: December 04, 2021, 07:18:41 pm
content: Hi,I only ever used SourceTree as version control and only locally (without GitHub) and without branching or any other general functionality.I cannot find anywhere details on how to duplicate/clone a GitHub repository from someone else's GitHub public account (say the public 3D printing Marlin firmware) directly to my GitHub account. How do you do it?I also downloaded GitHub Desktop and manage to open it in there but when I tried to Push it it tries to push to the original Marlin account not mine. Why? And how do I do that?No idea about branching at all as I never used it. Do I need to perhaps branch first? If so does it not appear as a branch on Marlin account (which I don't want to do because I just want to see how the software is written and not make any changes)?Thank you

author: langwadt
author_rank: Super Contributor
timestamp: December 04, 2021, 08:36:37 pm
content: fork instead of clone?

author: ledtester
author_rank: Super Contributor
timestamp: December 04, 2021, 08:52:19 pm
content: Quote from: ricko_uk on December 04, 2021, 07:18:41 pmSee this answer:https://stackoverflow.com/a/42084519/866915It shows how to do it at the command line. Not sure how to do it within the github desktop menus, but you should be able to do it from the command line.

author: sleemanj
author_rank: Super Contributor
timestamp: December 04, 2021, 10:31:15 pm
content: You click the fork button (top right of the repository page at github)

author: ricko_uk
author_rank: Super Contributor
timestamp: December 04, 2021, 10:35:15 pm
content: Thank you all,yes fork is what I was looking for!
Netbeans dark theme for MPLAB-X? - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 12:21:50 am
content: UPDATE- Reposted with a different question following some other suggestionsFor the topic below, this link offers a solution but the URLs for the plugins mentioned in there do not work:https://askubuntu.com/questions/1235016/how-to-use-netbeans-in-dark-mode-with-the-darcula-themeHi,I want to install a dark theme (not just change the text editor window background colour - but the full IDE background colour) on Netbeans as part of MPLAB-X but all the solutions online I have come across point to a number of plugins which do not seem available from the netbeans plugins page. Furthermore MPLAB's IDE (Netbeans 8.2?) does not have any Dark Them neither installed nor downloadable.1) has anybody managed to install a full dark them for MPLAB-X?2) MPLAB-X uses a much older version of Netbeans, where can I find Dark Themes like Darcula which are not available on the netbeans' plugin website anymore? They seem to have only plugins for the 2 most recent versions on their web page.Thank you

author: JPortici
author_rank: Super Contributor
timestamp: November 10, 2021, 06:35:24 am
content: Currently not possible. You can get almost everything in a dark theme, but some windows are unaffected (as in original netbeans) which results in a grand mess like having the structure in gray with dark labels and white text.People from MHCP said that next version will be 6.00, but they didn't give a timeframe for release (we missed the current release cycle, the next one is in march)What does this mean? Will they change the base IDE to be the current Apache Netbeans 13 or whatever? That would solve most if not all of the issues related to the old IDE, including this one, but.. who knows!

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 03:21:45 pm
content: Thank you JPortici,if you are interested Kalvin just replied to my other post here and I just tried and it works:https://www.eevblog.com/forum/programming/where-to-download-plugins-for-pre-apache-netbeans-8-2/?topicseenFrom there you can get the URL to install in Netbeans according to your Netbean legacy version and pull all plugins as described in the link above in this thread.The one that most people is Darcula (spelled like that). But there are other ones.Thank you

author: JPortici
author_rank: Super Contributor
timestamp: November 16, 2021, 07:01:51 am
content: Wonder if i should try again.. when i tried changing themes with darcula i had the most annoying experience (as i described, the window borders remained gray but the labels had their colour changed, all the windows with tables like the configuration window suffered the same fate, white table but the cell had background and text changed..
Errors highlight background colour change (in Netbeans) - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 04:31:21 pm
content: Hi,I tried every combination I could think of to change the background highlight colour of errors in Netbeans but couldn't. It used to be bright red but now it iseithernot highlighted at allorhas the same background colour as the rest of the editing window's (dark blue) so cannot see the errors.See attached picture where it says "reload this one too here?" without the commenting in front of it.Any suggestion which one is the option?Thank you

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 10, 2021, 06:19:25 pm
content: Did you really need 3 different threads about related issues with Netbeans? Just wondering...

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 06:42:45 pm
content: SorryWhen in the past - in other forums - in similar situations (i.e. related but different questions) I kept adding to the same thread, I was told off and to create a new thread for each separate question even if related to a previous one. Apparently that is so other people can more easily find solutions to the same problem just by reading the thread title which is also indexed by the search engines.So got into that habit. Will try to avoid in the future, hopefully will not then be told off again by someone else for doing that
Where to download plugins for pre-Apache Netbeans 8.2? - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 12:57:23 am
content: Hi,Netbeans plugins web page seem to make available only "recent" plugins and not all the plugins for pre-Apache version of Netbeans.This page offered some solutions but the URLs do not work anymore.https://askubuntu.com/questions/1235016/how-to-use-netbeans-in-dark-mode-with-the-darcula-themeWhere can I download plugins for the older Netbeans 8.2?Thank you

author: Kalvin
author_rank: Super Contributor
timestamp: November 10, 2021, 08:40:01 am
content: Will this help?https://cwiki.apache.org/confluence/display/NETBEANS/Where+to+download+plugins+for+NetBeans+10.0+and+earlier

author: ricko_uk
author_rank: Super Contributor
timestamp: November 10, 2021, 03:22:27 pm
content: Thank you Kalvin! Yes it find the repository with all the plugins.
How to schedule a python script with Flask at startup - Page 1
Forum section: electronics / general

author: SPRX
author_rank: Regular Contributor
timestamp: November 11, 2021, 06:16:59 am
content: Hi,I am trying to schedule a python script with 'Flask' module import and use in the programe for Webserver. Python code (with Flsk) runs ok if you run it manually. I am running flask 2.2, Ubuntu 18.04, Python 3.6.9 on a Jetson Nano.It sound very simple to use CRONTAB or systemctl to schedule the program, however non seems to work with me as soon as i includ the import flask in the python code. I spent lot of time trying to figure the issue or the solution with no success.Any suggestion/ direction on how to get it sorted if someone has come across similar issue?

author: tunk
author_rank: Super Contributor
timestamp: November 11, 2021, 11:10:13 am
content: I think they are run in a limited shell.If you haven't already done it, try to use full paths for commands and files.

author: SPRX
author_rank: Regular Contributor
timestamp: November 11, 2021, 12:27:12 pm
content: Thanks Tunk, I hv already tried that too without any luck
Segger Embedded Studio to replace MPLAB for PIC32 - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: November 06, 2021, 05:10:38 pm
content: Hi,does anybody use, or have used/tried, Segger's IDE (Embedded Studio) for development of PIC32 applicationsinsteadof MPLAB?If so, is it better or does it lack somehow?Thank you
trojan hidden in your source code in plain sight - Page 1
Forum section: electronics / general

author: madires
author_rank: Super Contributor
timestamp: November 01, 2021, 01:44:42 pm
content: Unicode can hide a trojan in plain sight in your source code:- CVE-2021-42574 and CVE-2021-42694- info and whitepaper:https://trojansource.codes/- examples:https://github.com/nickboucher/trojan-source

author: Cerebus
author_rank: Super Contributor
timestamp: November 01, 2021, 03:53:42 pm
content: This should come as no surprise to anyone with a soupçon of imagination. Shades of "Reflections on Trusting Trust" but without the true cunning that that exploit involved.

author: ataradov
author_rank: Super Contributor
timestamp: November 01, 2021, 04:57:43 pm
content: I'm thinking it is not that bad. All this stuff falls apart pretty fast with variety of editors and review tools. In the browser I noticed no issues at all. In my editor only examples for which GitHub complained about bidirectional Unicode text did something. And all they did was move some text to the right, which is pretty obvious and quite jarring. Some of those things broke syntax highlighting in obvious ways.When taking non-trivial amounts of code from other places, there may be a trojan in plain ASCII.

author: golden_labels
author_rank: Super Contributor
timestamp: November 01, 2021, 10:13:55 pm
content: We live in the age of vulnerabilities with their own brands and domains!While interesting, worth knowing and certainly something to address, be aware the problem is not new. That class of issues has been known for years. “TrojanSource” advances the technique a bit, making the attack slightly easier to conduct. But it shouldn’t be perceived as some completely new thing or the end of the world.A simple example in the attachment. Replacing characters in variables with look-alikes or making different variable names undistinguishable to human reader is another common way of performing such an attack.

author: ataradov
author_rank: Super Contributor
timestamp: November 01, 2021, 11:40:29 pm
content: And compilers will address this -https://www.phoronix.com/scan.php?page=news_item&px=GCC-LLVM-Trojan-Source
[C/C++] Mixing C and C++ - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: November 01, 2021, 01:58:05 pm
content: So, how do I do it? My use case is that I know C but have C++ files to incorporate. What should I do?I have found the stuff about marking a C header file at C in a C++ environment. If I write C is that automatically interpreted correctly as C is a subset of C++?I am using Microchip Studio, does that help me?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 01, 2021, 02:01:56 pm
content: (Nearly ?) all C source code should compile just fine with C++ compiler.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 01, 2021, 05:38:29 pm
content: There was already a thread about this:https://www.eevblog.com/forum/programming/crazyness-c-and-c-mixing/in which the topic was discussed in details. No need to go at it all over again.

author: Simon
author_rank: Unknown
timestamp: November 01, 2021, 07:11:46 pm
content: Thank you, I will take a look.
VS Code for Microchip PIC development - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: October 27, 2021, 08:08:41 pm
content: Hi,has anybody used VS Code (NOT Visual Studio) for writing code for PIC controllers?If so, is it easy to setup?Do you then compile using MPLAB?Does it work ok with the source files being open in both MPLAB and VSCode at the same time?Thank you
How to reset macro cell in Exilink XC2C256 VQG100 C - Page 1
Forum section: electronics / general

author: newit
author_rank: Contributor
timestamp: October 27, 2021, 03:42:32 am
content: Having a problem that Exilink XC2C256 VQG100 C macro cell became volatile after accidentally disconnect the power, are there any way to reset the chip so it can be program again. This chip use in conjuntion with dram as4c16m16s 7tcn and adsp-bf531sbstz400.
Any one know between this two chips which one should i replace exilink XC2C256  - Page 1
Forum section: electronics / general

author: newit
author_rank: Contributor
timestamp: October 26, 2021, 01:31:13 pm
content: Hi to all expertI'm new in this forum, I have a problem with my telescope computerized electronic motor control board(attached pictures), what happen is during flashing new firmware to the board(exilink xc2c256 chip or ram or rom) my power to the board is interupted when i turn the power back on there is nothing display on my hand held remote control. So I try to re-flash it again now the flashing went fine until the end the display show message" Take SD out Restart" I did exactly that and no display on the remote anymore. It's a simple motor control board only supply voltage to the Right ascendsion and Declination motors. Now I'm suspecting either the Exilink XC2C256 VQG100 Cms or Analog devices ADSP-BF531 SBSTZ400 went wrong with it that's why the chips won't store the firmware in it's macro cell, are there any way that i can reset the Exilink Macro cell or any advice to what is going on with the system it can be either Exilink or Analog device or the RAM itself? Any advice of how to fix would be appreciated. I had very few knowledge of electornicbut I only can test and replace chips, not know much on how it's work.regardssamhere is the link to the pictures of the board itself:https://postimg.cc/3WRW7dgMhttps://postimg.cc/xcmfTH8Zhttps://postimg.cc/dZdbv26m
Alteryx RTool not giving output - Page 1
Forum section: electronics / general

author: sarajoe
author_rank: Newbie
timestamp: October 20, 2021, 07:22:26 am
content: My code inRTool is not producing the output.Input <- read.Alteryx("#1") # Even tried using this to change input data to data frame.Input <- read.Alteryx("#1", mode="data.frame")print(Input) # The input data is printed.Output1 <- Input[Input$My_MONTH==max(Input$My_MONTH)-1 & !Input$CASE_ID %in% Input[Input$My_MONTH==max(Input$My_MONTH)-2,c("CASE_ID")],]Output2 <- Input[Input$My_MONTH==max(Input$My_MONTH) & !Input$CASE_ID %in% Input[Input$My_MONTH==max(Input$My_MONTH)-1,c("CASE_ID")],]write.Alteryx(Output1,2)write.Alteryx(Output2,3) [ Attachment Invalid Or Does Not Exist ]The problem is Output1 and Output2 do not get any data.https://coursedrill.com/alteryx-training
Learning FreeRTOS semaphore, mutex - Page 1
Forum section: electronics / general

author: BlogRahul
author_rank: Regular Contributor
timestamp: October 08, 2021, 03:44:04 am
content: HiI am playing with FreeRTOS on ESP32. I have experimented with few LEDs I understand task creations and how task executed. I want to learn about semaphore and mutex I don't have any real time requirements or hardware resources for RTOS. I have only ESP, Push button and LEDsCan we use only LEDs to learn semaphore, mutex? What to do with LEDs to learns semaphore, mutex ?

author: rstofer
author_rank: Super Contributor
timestamp: October 08, 2021, 04:18:25 am
content: The semaphore is simply a flag (sometimes a counter). You could have a timer interrupt set the flag and then test the flag in top level code. If it is set, light the LED. If it is 0, turn off the LED. In this simple example, it probably isn't necessary to disable interrupts in the top level code to prevent the interrupt from messing up the flag.More often, you need to disable interrupts in the top level code while you manipulate a shared counter. You can't have the interrupt routine change the value while you are testing it at the top level.A mutex is just a semaphore that is tested before using some resource. If another process is using it, your higher level code needs to wait for it to be available. A process is in use if the semaphore is 0 and available if it is 1. Here, you may have several processes competing for the resource so you most definitely have to disable interrupts before changing the value. Otherwise, two competing processes could potentially seize the same resource, not knowing that another process was in the middle of doing the same thing. There is a time between loading the value of the semaphore and storing the new value of the semaphore where is it not good to have another process doing the same thing.Free RTOS has a lot of ports to various chips and boards and the documentation is excellent. There are a lot of demo programs and, in fact, FreeRTOS runs on something as small as an Arduino (ATmega328).
Pointers for writing a PLL/VCO library - Page 1
Forum section: electronics / general

author: Scratch.HTF
author_rank: Regular Contributor
timestamp: September 30, 2021, 08:23:53 am
content: When I was writing four PLL/VCO libraries (ADF4351/ADF4355/HMC830/MAX2870), these pointers came to mind which I had to adjust accordingly:Bits which must be set as appropriate corresponding to an Integer (all Fraction values = 0) or Fractional (any Fraction value not 0) modeCharge Pump and Bleed settings which may be dependent on VCO frequency or integer (N) valueDouble buffering enable for certain bits in registers (including RF dividers) which will be latched on writing a certain registerVCO feedback (divided/fundamental) sourcePrescaler based on VCO frequencyLock Detect cycle count and timeout settingsADC clock dividerMUX OUT pin logic levelThere may be more which need to be checked, but this was enough to get my libraries working.
[solved] Bash: why does nano crash within a "while IFS= read{}" loop? - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: October 09, 2021, 01:06:09 pm
content: Code:function test_do(){local list="$1"local itemwhile IFS= read -r itemdo#nano "$item" # this crashesecho "$item"done < $list}function test_prepare(){local list="file1.txt file2.txt file3.txt file4.txt"rm -f listtouch listfor item in $listdoecho "hAllo $item" > $itemecho "$item" >> listdone}test_preparetest_do "list"In this script nano crashes, and I don't know exactly why

author: magic
author_rank: Super Contributor
timestamp: October 09, 2021, 05:37:38 pm
content: I suppose nano starts to read your list, interprets it as commands and crashes due to some bug.Maybe you could save a pointer to the tty file outside the loop and inside the loop redirect nano stdin to the tty.editNo need for tty files, just Bash redirects. This errors outCode:while true; do vi; done </dev/nullbut this worksCode:exec 123<&0while true; do vi <&123; done </dev/null

author: DiTBho
author_rank: Super Contributor
timestamp: October 09, 2021, 07:09:51 pm
content: my understanding is that "read" is not a program but rather a "builtin" function to read words, not lines, but "IFS= read -r linea" was introduced later as the canonical way to read one line of inputThe used "-r" option should removes the backslash processing, while with the Input Field "IFS="(1) ... "read" should read from stdin one byte at a time until it finds an unescaped newline character or end-of-input, so it doesn't splits a line into words but rather return the whole line.If it was C code, it would be a kind ofCode:while (!fof(file)){get_line(&linea);}But it doesn't operate on a file pointer but rather directly on stdin and there is no select() to mitigate so as far as one knows or can see and this is a problem for Nano when it invokes its input methods linked with ncurses to process the stdin.Redirecting a compound command causes it to run in a subshell ... that's what makes me perplex: in theory, it should work(1) "IFS=" means empty string, so no character will be used to split, therefore no splitting will occur

author: magic
author_rank: Super Contributor
timestamp: October 09, 2021, 07:52:25 pm
content: There is no problem with the loop and with read. They process the "list" file line by line as intended.The problem is nano. It also runs inside the loop. It also gets the redirect.It reads commands from the next line of your "list" file instead of the terminal.You need to save the original stdin descriptor before the loop and pass it to nano.

author: DiTBho
author_rank: Super Contributor
timestamp: October 09, 2021, 08:07:32 pm
content: Code:function test_do(){local list="$1"local itemexec 42<&0 #save stdin as filedescriptor 42while IFS= read -r itemdonano "$item" <&42 # use filedescritor 42 as stdin#echo "$item"done < $list}function test_prepare(){local list="file1.txt file2.txt file3.txt file4.txt"rm -f listtouch listfor item in $listdoecho "hAllo $item" > $itemecho "$item" >> listdone}test_preparetest_do "list"Yup, this works! Thanks!
6809 + acia 6850 - Page 1
Forum section: electronics / general

author: Wawavoun
author_rank: Regular Contributor
timestamp: September 08, 2021, 06:23:00 pm
content: Hello there,I have a question for the assembly language specialists.Below we see the 6809 code on the right and the timing diagram of the data bus on the left.Can somebody confirm that the data which is read in the 6850 by the instruction "LDB ,X" is indeed $0C ?We can clearly see $E684 then a $C5 (what is that ?) then $0C (the data read at address X) then we see the $C502 of the operation "BITB # $ 02".If the data is really $0C logically the program switch to END and the loop starts again and nothing is ever written in the output register of the 6850 ...Finally if anyone has any idea why the TDRE bit of the 6850 is not to one after a reset that interests me a lotCould that come because the CTS input (coming via a MC1489 line receiver) is floating ?Have a good evening.Philippe

author: edavid
author_rank: Super Contributor
timestamp: September 08, 2021, 07:05:49 pm
content: Quote from: Wawavoun on September 08, 2021, 06:23:00 pmYou answered your own question.If the MC6850 CTS* is connected to a MC1489, it's not floating. An unconnected MC1489 input is logic low, so the MC6850 CTS* input will be high, and TDRE will be low.

author: Wawavoun
author_rank: Regular Contributor
timestamp: September 08, 2021, 07:53:37 pm
content: Sorry if I was not clear !The cts input of the 6850 is obviously not floating because connected to a MC1489 output.And yes it is the corresponding MC1489 input which is unconnected and floating...The cts input of the 6850 is inverted (I dont know the word in english, in french we say "CTS barre")... So I have think cts is active at 0 (and then tdre bit set to low) and inactive at 1..Regards.Philippe

author: edavid
author_rank: Super Contributor
timestamp: September 08, 2021, 08:17:48 pm
content: Quote from: Wawavoun on September 08, 2021, 07:53:37 pmThe MC1489 inverts the signal. You need to tie the MC1489 input to a high level.

author: Wawavoun
author_rank: Regular Contributor
timestamp: September 10, 2021, 07:15:48 pm
content: Hello,With cts and rts connected together and dcd to +12 V (logic 0) everything work fine !Thanks all for your advices !Regards.Philippe
Console Animation C# - Page 1
Forum section: electronics / general

author: etnel
author_rank: Contributor
timestamp: September 07, 2021, 04:04:49 pm
content: Any ideas of how I would make a "Cube" bounce from the right->left->up->down in a loop. Similar to the "DVD-animation" but it does not need to bounce off random values. I would like the code as short as possible.The "Cube" is a 3x3 of "#".# # ## # ## # #

author: etnel
author_rank: Contributor
timestamp: September 07, 2021, 04:57:26 pm
content: Code:static void DrawTop(int space){for (int i = 0; i < space; i++){Console.WriteLine();}Console.Write("# # #");Console.WriteLine();Console.Write("# # #");Console.WriteLine();Console.Write("# # #");}Added top to bottom. Pretty much figured out everything. If anyone sees a way to improve, please let me know.
GNU libc version 2.26 manual - Page 1
Forum section: electronics / general

author: Karel
author_rank: Super Contributor
timestamp: October 14, 2021, 02:32:33 pm
content: I just discovered that gnu.org updated their libc online manual and they removed POSIX threads (at least the description of pthread_create()).Does somebody know a link to the older libc html manuals? I need version 2.26 but I can't find a link to older versions.edit: don't bother, I found it.Thanks.

author: PlainName
author_rank: Super Contributor
timestamp: October 16, 2021, 02:23:13 pm
content: QuoteMaybe someone else might benefit from knowing where you got it. Saves them asking the same thing, see.

author: Karel
author_rank: Super Contributor
timestamp: October 16, 2021, 03:03:28 pm
content: Quote from: dunkemhigh on October 16, 2021, 02:23:13 pmI installed the manual v2.26 using the package manager on my system.Not that it helped me much because also that version did not have the description for pthreads.Then I remembered that, when I wrote the software using pthreads, I used a book called"The Linux programming interface" by Michael Kerrisk, as a reference...So, I haven't found any "official"online manualfor POSIX threads. If somebody now where to find it, I would like to hear it.

author: ejeffrey
author_rank: Super Contributor
timestamp: October 16, 2021, 07:56:37 pm
content: The man pages for the specific functions are part of the linux man pages project:https://man7.org/linux/man-pages/man7/pthreads.7.htmlhttps://linux.die.net/man/7/pthreadsFor more on "how to use threads", any pthread book should have that such as this one:https://www.oreilly.com/library/view/pthreads-programming/9781449364724/

author: golden_labels
author_rank: Super Contributor
timestamp: October 17, 2021, 07:28:28 pm
content: Karel:The GNU C Library is merely implementing an existing specification:IEEE Std 1003.1-2017 (pthread.h). The library doesn’t need to copy that, as it’s both a burden and a copyright issue. And I do not recall it ever did, so I am not sure, what you mean by installing an older package.Documentation regarding glibc’s API is maintained by the Linux manual pages project.Sections 3p and 3are of interest to you, along with the section 7 introduction mentioned byejeffrey.

author: Karel
author_rank: Super Contributor
timestamp: October 17, 2021, 09:37:51 pm
content: Quote from: golden_labels on October 17, 2021, 07:28:28 pmFor glibc I usually use this one:https://www.gnu.org/software/libc/manual/html_node/index.htmlI thought there was also a similar manual for pthreads. Apparently not.Man pages I use when I know the function but I want to check the exact arguments and/or return value.For more generic things as "how to do x", I find the glibc manual (in html form) very helpfull.I find it a pitty that there isn't something similar for pthreads.
Pickit 3 bricked by mplabX, fixed. - Page 1
Forum section: electronics / general

author: DavidAlfa
author_rank: Super Contributor
timestamp: August 13, 2021, 03:23:02 pm
content: I already had issues for the last days when connecting to a target. Random messages like too much power being drawn, although nothing was connected to it.After changing to a different mcu, mplabX updated the firmware and finally killed it.Usb noticed nothing when plugging it, steady lights ...yep, really dead.I saw some posts, also the article in google "How to unbrick the pickit 3".Flashing "PK3IMG020005.hex" from the Pickit 3 standalone tool did only partially work.The usb was recognized again, but nothing would connect to it. I tried everything: Mplab 8, mplabX, pickit 3 tool... all freezed when trying to connect.After a lot of flashing and more bashing holes in the table, I found the way:- Flash the pk3img file using pickit 3 standalone tool (It's the utility folder after installation).- When it finishes, close everything. Ensure no mplab*** is running.It seems that if mplab connects first, the pickit3 will never work again, needing a reflash. Don't ask me why.- Connect the new programmed pickit 3, open pickit 3 standalone tool. Should be able to connect but might need some tries.- Go to tools... switch to mplab mode. After that, Mplab should be able to recover it.Anyways, here's an hex file, already in MplabX mode.Flash and ready to go, no need to do any steps. It's preloaded with PIC18F firmware.
matplotlib charts and syntax from Python - Page 1
Forum section: electronics / general

author: RoGeorge
author_rank: Super Contributor
timestamp: July 11, 2021, 03:30:46 pm
content: Each time I plot something from matplotlib/Python I find myself googling for syntax and how to do stupid but necessary things, like adding an extra axis, or changing the ticks color, or making the grid dashed, etc.Sometimes I spend hours trying various copy/pasted pieces of code to configure a single chart. Only certain combinations works, and so far I couldn't deduce what are the rules, the syntax, or the structure and attributes of a chart.Random example: to make y axis logarithmic it's either with plt.yscale('log) or ax.set_yscale(log) like in the multiline comented section.Code:import matplotlib.pyplot as plt# data processing here ... then plotplt.plot(frequency, V1, 'red')#plt.yscale('log',base=2)plt.yscale('log')'''# alternative methodfig = plt.figure()#ax = fig.add_subplot(2, 1, 1)ax = fig.add_subplot()plt.plot(frequency, V1, 'red')ax.set_yscale('log')'''#plt.xlim((400*1e3, 600*1e3))#plt.ylim((0.2, 0.3))plt.grid()plt.show()Where can I find a systematic way to learn about how to configure charts and plots?Is there a map with all the objects, their hierarchy, methods, attributes and enumerations that are valid?
[Python] How to grow skillset in a constrained environment? - Page 1
Forum section: electronics / general

author: MajorEE
author_rank: Contributor
timestamp: July 01, 2021, 04:24:05 am
content: I want to improve my driver code quality, and usability but I don't know where to go to improve my skills in terms of learning new techniques and architectural improvements since I don't work with others more knowledgeable than myself. Of particular interest is the oscilloscope switch statement to handle switching voltage and time-base settings.The inputs are finite, I've used enums in the past, and straight function calls set_time_2ns but then there are TONS of these functions and I want to clean it up to make more concise, and easier to follow but also remain validated and error resistant.What can I do to better myself in terms of learning new techniques and skills?While this is directed at the scope problem in particular, where in general can one develop their skills when they don't work under someone more knowledgeable? Everything I've been working on I've had to google and teach myself. I just don't feel that I can develop skills fast enough this way.

author: Berni
author_rank: Super Contributor
timestamp: July 01, 2021, 05:42:59 am
content: Even if you work full time as a software developer at a company, you will never have someone sit on your shoulder and teach you how to code better, other employees don't have time for that, they got there own work to do. They would generally help you more in terms of brainstorming sessions where you bring up a particular problem you are trying to solve and having issues with and they would give you some tips and ideas of how they might approach it. It does help a lot when nothing is working and you run out of your own ideas to try.Learning programing is pretty much just working on some project and googling things as you go. But if you would like a more guided experience (often people do when they are just starting out) then you can find some programing courses online. Lots can be found on YouTube for free, or you can buy some larger more detailed courses on a few websites that sell them as a long series of videos (Tho careful with those, some are great courses, but some are terrible), this lets you experience it in a more class lecture format.But don't be ashamed of googling solutions to your programing problems and copy pasting code from stack overflow. As long as you actually read the code you copy pasted and understand what it does, then you actually learned something by doing it. Also programmers don't keep everything in there head. They always have some sort of code reference or documentation open on the side to refer to.

author: rstofer
author_rank: Super Contributor
timestamp: July 03, 2021, 04:22:19 pm
content: You're writing driver code in Python? Hm...As there are many ways to program any project, look around at other people's code. If you want to see C pushed to the limits, look at the Linux kernel or some of the utilities. The code has been reviewed by tens of thousands of people.
DSO1062D open source firmware - Page 1
Forum section: electronics / general

author: tyger
author_rank: Newbie
timestamp: July 03, 2021, 11:17:25 am
content: Hi,The DSO1062D is very populair as you can change it from 70 to 200mhz and there are multiple hacks/schematics available soCorrect me if i am wrong but there is nobody that is working on a open source firmware right?I found a source online, it looks like this would be a good starting point to add features and update these scopes to a better product.Any programmers here that are intrested in this?
Sonar ProcHijack g45 - Page 1
Forum section: electronics / general

author: Jan Audio
author_rank: Frequent Contributor
timestamp: June 29, 2021, 02:26:28 pm
content: Hi, what can cause a Sonar ProcHijack g45 norton message ?I made win32 software and try running it on windows 10 pc with norton security.I am searching a bit, only it wont tell what is wrong with my code.Anyone know anything ?thanks