hybridfree/eevblog-posts huggingface dataset:
Microchip SAME51 send CAN message with timeout - Page 1
Forum section: electronics / general

author: chipsoft
author_rank: Newbie
timestamp: July 06, 2021, 09:34:28 am
content: I use Atmel start and ASF4 library to generate base project and working with CAN bus on ATSAME51. All work fine without timeout (send, receive CAN messages) with base ASF4 can library function in interrupt mode. Atmel start use TX FIFO to send CAN message, and I can't change this options.Can anyone suggest how to implement sending a CAN message with a timeout? That is, if a message cannot be transmitted within a specified period of time (automatic retransmission is enabled), the transmission is canceled. Actually, the problem is how to cancel the transmission of a message that was sent using TX FIFO but was never transmitted. The datasheet literally writes: "Transmit cancellation is not intended for Tx FIFO operation." Perhaps there is another solution, how can this be done?Or it is worth getting away from using TX FIFO, and then, accordingly, it will not be possible to use the ASF library.

author: ataradov
author_rank: Super Contributor
timestamp: July 06, 2021, 04:57:19 pm
content: There is no way to cancel FIFO entries. That would require moving things around in the FIFO memory.You can still use ASF4 for initialization, but you would have to implement the code for the buffer mode.

author: chipsoft
author_rank: Newbie
timestamp: July 06, 2021, 05:22:19 pm
content: Thank you!It looks like I found a hardcore solution, specifically for TX FIFO with a buffer length of 1 to cancel CAN transmission:Code:CAN1-> CCCR.bit.INIT = 1;while (! CAN1-> CCCR.bit.INIT);CAN1-> CCCR.bit.CCE = 1;CAN1-> CCCR.bit.CCE = 0;CAN1-> CCCR.bit.INIT = 0;while (CAN1-> CCCR.bit.INIT);In general, it is very strange that neither the ASF nor the Harmony support anything other than TX FIFO. The task is quite relevant, not all CAN messages always reach their recipients in the real world

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 17, 2021, 05:17:02 pm
content: Quote from: chipsoft on July 06, 2021, 05:22:19 pmThere are dedicated transmit and receive buffers, I never even used the TX FIFO since I usually only send out a few messages anyways.I do like the RX FIFO though since I can poll it in my main task with no risk of having it overflow.
Controller board for Dell Studio 1735 LCD - Page 1
Forum section: electronics / general

author: RaptorHunter
author_rank: Newbie
timestamp: July 16, 2021, 11:54:11 am
content: Hi everyone, I want to use a LCD from a DELL Studio 1735 the LCD is a LTN170BT06 LCD, I can't find a direct board anywhere this LCD seems to be obscure and was only used for the Dell Studio 1735, so if there is a DIY solution for this please help. The LCD uses a 50 pin connector.I saw a listing, but this seller doesn't ship to my current location and isn't replying to my messages.https://www.ebay.com/itm/154279249276
STM32 with  PCIe ?? - Page 1
Forum section: electronics / general

author: frogblender
author_rank: Regular Contributor
timestamp: July 27, 2021, 05:40:57 pm
content: Anyone know of any STM32 part which supports PCIe (either as a host or as a peripheral)? After a bunch of googling, I think the answer is a big fat No, but I thought I'd ask the herd her anyway...

author: Scrts
author_rank: Frequent Contributor
timestamp: July 27, 2021, 05:47:01 pm
content: Quote from: frogblender on July 27, 2021, 05:40:57 pmNo.And.. Why?

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 27, 2021, 06:07:04 pm
content: I don't know of any "microcontroller" with a PCIe interface. If anyone does, I'd be curious to see that.

author: pigrew
author_rank: Frequent Contributor
timestamp: July 27, 2021, 06:29:57 pm
content: No STM32 has a PCIe controller. Generally, people will use a FPGA for PCIE in prototypes (and small production runs).Google found a few interface IC that may be usable with a STM32. I've never used them and I expect you would not get great performance:WCH IC CH368ASIX AX99100
S32K144 S32K ADC DMA Circular buffer - Page 1
Forum section: electronics / general

author: rvalente
author_rank: Frequent Contributor
timestamp: July 12, 2021, 07:18:19 pm
content: Hello Mates,I need to sample one channel from the S32K for 3 seconds @12bits and 5KSA/s, I did this code attached, it holds one sample value to the DMA buffer.What I'd like to do is to have a 30KB buffer (short uints) and have it filled with sequential captures (circular buffer) but I can't find a example of how to set the DMA Modulo to do it.I believe the eDMA from the S32K is similar to some advanced Kinetis (which I've never used)Attached the project, its on my google drive due to size, to big for the forum rules.https://drive.google.com/drive/folders/1EnapruXWJ5ObzDbxvx59vPCpSMc7za84?usp=sharingAny suggestions?Greetings, Renan
Logitech F310 gamepad 1/2 of output missing ?? enCoRe V CY7C643xx MCU - Page 1
Forum section: electronics / general

author: MathWizard
author_rank: Super Contributor
timestamp: July 10, 2021, 06:36:50 am
content: I have a used f310 game controller with the standard analog thumb-sticks with dual-axis- 10k pot's. They have 1V across them to GND. The problem is with the right stick's L-R output that ends up in windows. I have windows 10 w/updates, and the correct logitech driver. And calibrating it w/ joy.cpl did not helpIf I look at the raw output in the calibration settings or on a website for that, everything works fine except the right stick, which is a 10k pot divided into 16-bit, so 0-65,535 (maybe only 9-bit in windows, 512 steps of 128). When the thumbstick is centered, it reads as if it's stuck at ~43k, and pushing it to the left some, it will get to 1/2 way point of 32.8k. But then only once it's all the way to the left, it jump's from 32.8K directly to 0 (or actually 128 I think).Pushing it to the right, more or less seems normal, except it starts centered at 43k, and goes smoothly up to 65k.So it's like the range got moved and stretched, and all the steps of the lower half are gone.Looking at the center of the pot, which has 1V to GND across it, I can see the voltage is centered at 0.5V, and moves nicely from just above 0V to just below 1V. So that's not the problem. The trace goes directly into the MCU, so an ADC inside it.So if its a hardware problem, maybe some of the transistors responsible for the 0-0.5V part aren't working. The chips are expensive tho, it's cheaper to get a new controller.But for fun, I'd like to see what's happening in the chip.It has I2C, SPI, so how hard or easy would it be (for a CS newb) to see inside some memory register, and see what data is or isn't getting out of the ADC, or any diagnostics that might have warning flags ? Maybe the thing need rebooting and re-flashing somehow. Most searching on repairing these, is for dirt/dust repair, not EE/CSOr would it be all hidden behind firmware, encrypted ROM, and you would need a CS degree to do that ? Just skimming through chapter 6-7, I'm way over my head that's for sure.

author: MathWizard
author_rank: Super Contributor
timestamp: July 11, 2021, 06:54:58 am
content: Hmmm somehow it has been fixed. I got it a month ago and installed drivers back then, and it was having the problem. I tried it a few times since, and I've rebooted and it was the same.Then I tried it yesterday again, before I was about to take off it's thumbstick/pot's and put them on my old controller. And it worked almost perfect. Played a few race games for once in ages. I bought a few this year, but my old controller's pot's are worn out, then I finally got this used 1.The cost of the dual-axis part is about the same as a cheap, but new controller, same with the chip.
High Side Power switch as a Relay - Page 1
Forum section: electronics / general

author: Jeff Weinmann
author_rank: Contributor
timestamp: July 07, 2021, 06:48:31 pm
content: Hello all,I'm creating a series of low pass filters that will be used in a HAM WSPR project. The maximum current I'll be using is around 200 milliamps. I will have a need for a microcontroller (PIC18) to switch between 4 low pass filters that will clean up HF output frequency square wave to a nice sine wave.Traditionally people have used mechanical or solid state relays to switch between the low pass filters. I want to use 4 of these guys to do the same thing:https://www.digikey.com/ordering/shoppingcart?qty=24&cref=&enterprise=0&part=576-3006-1-ND&partid=1834815&source=search&lang=enThese will all be connected to a PIC via PORTB and I will be able to turn them on and off via code.Does anyone see a problem of using these instead of a solid state or mechanical relay?ThanksJeff

author: David Hess
author_rank: Super Contributor
timestamp: July 07, 2021, 07:42:24 pm
content: Do you mean to use them alone? High side power switches have their power and input pins shared so are not suitable for switching variable inputs.

author: ajb
author_rank: Super Contributor
timestamp: July 07, 2021, 07:44:59 pm
content: Also look at the diagram in the first page of the datasheet and note the diode in parallel with the pass transistor. These will not prevent current from flowing from the load side to the input side, so are not suitable for AC applications.

author: David Hess
author_rank: Super Contributor
timestamp: July 07, 2021, 07:59:14 pm
content: Quote from: ajb on July 07, 2021, 07:44:59 pmThere are ways to bias RF switches so that the body diode is not a factor.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 07, 2021, 10:39:36 pm
content: Quote from: David Hess on July 07, 2021, 07:59:14 pmHow would you do it here?

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2021, 04:48:46 pm
content: Quote from: SiliconWizard on July 07, 2021, 10:39:36 pmYou would not for the reason I gave in my first post; assuming that the part's performance was otherwise suitable, which I doubt but it is possible, the high side switch has power and input connections shared on one pin preventing it.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 08, 2021, 05:28:12 pm
content: Indeed.The OP could take a look at this:https://www.analog.com/en/parametricsearch/10725#/
Carrier Air Handler Motor control Codes - Page 1
Forum section: electronics / general

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: July 06, 2021, 08:44:51 pm
content: Do any of you know the signaling (codes, formatting, rate, etc.) used to run and monitor HVAC air handler motors, specifically, Carrier Infinity. I have a dead blower motor that appears to be due to a failed ECM on the PM motor. I'd like to be able to communicate with it on the bench, but net searches are tuning up squat. The ECM comm plug has single TX and RX pins and the air handler controller is a PIC, so I assume a UART peripheral is being used.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 07, 2021, 02:05:22 am
content: Try connecting a scope to the lines and see how it's trying to communicate. There's a good chance it's just PWM to set the speed and a frequency signal for speed feedback.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: July 09, 2021, 03:34:10 pm
content: I installed a new ECM and all is well. The energy savings for these motors is more than offset by initial cost of the PM motor and any repairs that may be needed.
System-on-Chip Video Player IC? - Page 1
Forum section: electronics / general

author: x0054
author_rank: Newbie
timestamp: July 03, 2021, 12:09:04 am
content: I am looking for an inexpensive SOC that I could program to read video files from an SD card and play them to a screen and audio output of some kind. The videos are 480p and can be encoded in whatever format that the IC prefers. For output I am feeding the image directly to a 480P LVDS screen, so if it can do that directly, that would be perfect.I am optimizing for cost and boot time. This would be a chip that might be used in video capable digital photo frames, or maybe kiosk displays. I am shooting for something under $10 per IC. Any more expensive then that and Pi Zero starts to look appealing, but for boot time I wanted to find something more purpose built. Spent the day rummaging on Digikey with no luck.- Bogdan

author: amyk
author_rank: Super Contributor
timestamp: July 03, 2021, 02:32:46 am
content: If you look around you might find companies wanting to send things that do that to you for free...https://www.eevblog.com/forum/projects/now-what-can-i-do-with-120x-of-these/
Chicken coop automation - Page 1
Forum section: electronics / general

author: Chickenguy
author_rank: Newbie
timestamp: July 12, 2021, 10:26:25 pm
content: I want to create a hub that can control small dc motors, fans, lights, water valves etc. I hope to use as few devices as possible and as few languages as possible in the hardware hub. I plan to have a cloud based web server that will serve as the client so the microcontroller powered hub will just need WiFi and a mechanism for the remote web app to issue commands to the microcontroller and receive information back to present to the user.I understand that arduino and rasberry devices cannot handle voltage high enough for small motors so I will need an intermediary device hooked up to a battery (which I plan to charge with a solar kit). I assume all devices will be DC. I am hoping for 8-12 input outputs that can control these external devices and all external devices can be simply on/off devices. Any guidance on the hardware stack that could accomplish this would be helpful, I just don’t even know where to start. Thank you!!

author: themadhippy
author_rank: Super Contributor
timestamp: July 12, 2021, 10:58:01 pm
content: How much current do the outputs devices need and what sort of voltage ? something like the uln2003 d arlington array is good for 500ma and 50v and has 7 outputs,or the ULN2803A which has 8 outputs

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 12, 2021, 11:04:01 pm
content: Depending on the current needed by the motors you want to use, you could use transistor-mosfet pairs to drive them from the logic outputs on either the Arduino or Pi.In the case below, the mosfet(M4) is a XR46000ESETR, the transistor(H5) is a MMBT3904-TP. I use this to PWM control a 12V computer fan for cooling my Pi, although be aware it inverts the logic, so a high signal stops the fan, I have it fed via a 6 channel logic inverter(SN74AHCT04DR), so the code makes more sense to write. If you want to control beefier motors, you could happily power a 12V coil in a relay using that circuit. Include a flyback diode if you do though.

author: pqass
author_rank: Super Contributor
timestamp: July 13, 2021, 12:20:21 am
content: Be careful how you wire the output drivers. Make sure that motors/solenoids default to off during MCU boot.eg. On the atmega328, before program control starts, MCU pins default to input so the pullup on the MOSFET gate (Microdoser's schematic) will pulse the output briefly until the program initializes it to an output and sets it to high.The pulse can be avoided by a 10K resistor on the base of the NPN to MCU Vcc; turning on the transistor during powerup or while the reset button is held down; keeping the MOSFET off.

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 13, 2021, 11:11:14 am
content: Quote from: pqass on July 13, 2021, 12:20:21 amAh yes, I didn't show that on the schematic, before the logic inverter, there is a 10K pull down resistor that keeps the signal at ground unless pulled up by the Pi. That keeps pin 1 on H4 high by default, grounding pin 1 on the mosfet and so keeping the fan off.Well caught.(Trap for Young Players)
Debug/trace/log structure (library) - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: July 01, 2021, 10:03:48 pm
content: Hi,there are plenty of debug, trace, log functions already built in most development environments but I have written my own wrapper which adds functionality. Basically it is a single function where I pass the values/fields listed below then I can do all sorts of logging, printing based on all sorts of filtering to affects its behaviour during debug or build.- time since start (or OS ticks)- level (Error, warning, debug, info, log)- comment- file- function- line (sometimes redundant if you use function but not always)- software break (yes/no)- up to 5 parameters (uint32 that I can use to log any info/variable)Then through #defines I can decide different behaviours. For example in debug I can customise that function to print to the console all messages from a certain function after a specific time. Or again as another example, in release mode store into a uSD card all data that has a level of "Log" together with the associated parameters.My questions are:1) have any of you done something similar or do you know of similar libraries?2) any suggestions/feedback on the concept and/or what would u add?Thank you

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 01, 2021, 10:46:19 pm
content: 1. Yes I've done something similar. Like many of us have, I'm sure. I don't think I've ever used a third-party library for this. I'm sure there are tons out there.2. Well, I don't know what you want to achieve/what kind of info you'd like to have. So it's hard to answer. What I can say though (and that I have implemented) is having code profiling features is handy. I wrote a profiler lib for C. You can define named sections of code to track, and the lib will store execution time, number of executions, etc... for each section. Sections to profile can be nested. Then the lib computes statistics on this (for instance it will compute the min, max, average and std deviation of execution time for each section) and stores the report in a file at the end of program's execution. In the report, it also sorts results according to various criterions. Very handy. GCC has a profiling abilities too, but you must use specific compile options for this, and it doesn't give as much info as my lib, so I rarely use it. (Saying that for those who would reply: but why implement your own since GCC has this!)

author: ricko_uk
author_rank: Super Contributor
timestamp: July 02, 2021, 12:05:32 am
content: Thank you Silicon Wizzard,having code profiling would be good (I added the __FUNCTION__ for that, but how do you make it more granular? How do you know which section you are in?Thank you
Microchip ICSP adapter ICD RJ to 6W header (AC164110 compatible) - Page 1
Forum section: electronics / general

author: voltsandjolts
author_rank: Unknown
timestamp: June 29, 2021, 09:52:34 am
content: [June 2021 pricing] GBP16+VAT for this simple adapter is ridiculous:[July 2023 pricing] GBP23+VAT for this simple adapter is ridiculous:https://uk.farnell.com/1540971Here is a gerber/drill ZIP you can upload to your favourite PCB manufacturer.Parts required are:6W SIL HDR, SULLINS PPPC061LGBN-RC, DIGIKEY S5481-ND6W 6P6C RJ12, MOLEX 0950097661, DIGIKEY WM11184-NDThe board silkscreen has the pin functions labelled but beware these only apply to the target connection. If you are using this to adapt PicKit to RJ then the labelling is wrong (see photo).

author: voltsandjolts
author_rank: Unknown
timestamp: June 29, 2021, 10:03:14 am
content: I use 1mm pitch 6W ribbon cable with the 6P6C RJ12 connectors, gives a nice flexible programming lead.e.g. 3M 3625/6https://uk.farnell.com/2064518

author: Ian.M
author_rank: Super Contributor
timestamp: June 29, 2021, 10:14:15 am
content: Do what most of us cheapskates do - make up a cable with a 6P6C modular plug on one end and a female 6x 0.1" pitch square pin header on the other. If you need to connect a PICkit 2/3/4 to an ICD socket target, make one up with a male 6x 0.1" pitch square pin header instead. Don't go over 9" long as the crosstalk can cause issues due to Microchip's crappy choice of pinout (they should have put PGC between Vdd_target and Gnd, not right next to PGD). As the cables have one purpose only you can unambiguously label pin 1 on the 6 way header.

author: voltsandjolts
author_rank: Unknown
timestamp: June 29, 2021, 10:25:48 am
content: Been there. Done that. OK for for one or two cables but I need more.

author: jaka
author_rank: Contributor
timestamp: July 01, 2021, 12:33:11 pm
content: That's a good idea to include test points for all the lines!I made similar clone of the AC164110 some time ago. Design data available herehttp://kair.us/projects/icd2pickit/index.html
Fix esp8266 ch340G adapter programming - Page 1
Forum section: electronics / general

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 25, 2021, 12:55:43 pm
content: After receiving one these little adapters for the ESP-01 to get rid of the messy adapters/wiring I had always used, I discovered they can't set the esp8266 in flash mode automatically like nodeMCU board does.No surprises here, coming from aliexpress. Anyways, I didn't want to do the "fix" found on the net, gluing a switch, uhh ugly messy patch. And always needing to push the button.So instead I copied the circuit from nodeMCU board, with SMDs it keeps tidy and it works great!Furthermore, I made an artificial "via" (a damn hole!) below the CH340 to pass the wires, to avoid wrapping them around the board. Some glue to protect everything, and done!I don't know if this has already been done, probably did, but didn't found the fix specifically for this adapter.
PDS Bitcloud Zigbee Stack - Page 1
Forum section: electronics / general

author: Swati Chikmath
author_rank: Newbie
timestamp: June 24, 2021, 02:50:31 pm
content: Hello Everyone,Is their any restriction to use PDS to store data in non volatile memory when the node in zigbee network is programmed as coordinator?As I have programmed with the file descriptor MEM_ID, Storing and restoring data using PDS_Store and PDS_Restore function. I dont find value being store in PDS and restored from PDS.I have carried out this process in Zigbee bitcloud on ATSAMR21G18A microcontroller board.Look for your suggestionsThank you
LEGACY: 68HC11 DIO port problem - Page 1
Forum section: electronics / general

author: AussieBruce
author_rank: Regular Contributor
timestamp: June 16, 2021, 04:58:11 am
content: I still use the old Motorola/Freescale 68HC11, and am having difficulty with PortA. According to the HC11 manual, PA-3,4,5 and 6 can double as GP outputs, and as outputs driven by the main timer output compare function. I believe I’ve done what’s needed to disconnect these pins from the timer (details below), and I can drive 4,5 and 6 OK, but not PA3, it appears to be Hi-Z rather than an output. There’s no reference to a DDR in the manual, and the diagrams of the port logic shows these pins as output only.It doesn’t seems to be a hardware fault because more than one known good chip shows the problem.The port setup I’ve done is to set register TCTL1 to zero, which should disconnect the timer. However, the documentation is a bit vague around this area and there are a number of references to other registers that may interact.The device family is MC6811E2.Can anyone assist?

author: Benta
author_rank: Super Contributor
timestamp: June 17, 2021, 09:10:11 pm
content: That shouldn't be possible.Are you sure your pinout is correct? PA7 can do this, but not PA3.
SD /SDIO SPI protocol - Page 1
Forum section: electronics / general

author: JoeyG
author_rank: Regular Contributor
timestamp: June 17, 2021, 12:45:11 pm
content: Can someone confirm that all SD card protocols are clock synchronized?IE there is no data transmission without clock?

author: abyrvalg
author_rank: Frequent Contributor
timestamp: June 17, 2021, 07:25:35 pm
content: All types prior to UHS-II require clock for transfers.
Microcontroller for MJPEG video with MIPI - Page 1
Forum section: electronics / general

author: luiHS
author_rank: Frequent Contributor
timestamp: June 07, 2021, 01:40:52 pm
content: Hello.I have several projects where I need to play videos with small MIPI screens.I already had the hardware designed using STM32, but due to the current crisis they are totally out of stock in all providers.Do you know any other microcontroller that has MIPI output and hardware JPEG decoding?I also want to look at some of the FTDI graphics drivers.I cannot use Raspberry-based solutions because the designs have to be very compact, the space is very small to fit a Rpy CM4 and also the MIPI output only works with screens made for the Raspberry.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 07, 2021, 03:26:27 pm
content: Could you trade off storage vs. JPEG hardware and use uncompressed video?

author: vladant
author_rank: Newbie
timestamp: June 07, 2021, 04:10:32 pm
content: How big is jpeg frame and frame rate ? Have you considered decoding by software using any other STM32F7 ?

author: luiHS
author_rank: Frequent Contributor
timestamp: June 07, 2021, 05:10:19 pm
content: Quote from: mikeselectricstuff on June 07, 2021, 03:26:27 pmIt is an option that I also thought about. For a 480 * 480 pixel screen, I guess it would be 414.7Mb per second for a 30fps video. Maybe with a 32Gb SD it could work for me, although I would prefer videos compressed in MJPEG.

author: Scrts
author_rank: Frequent Contributor
timestamp: June 16, 2021, 08:03:31 pm
content: Is FPGA an option?Xilinx provides MIPI-DSI for free and then you'd add something like this on top:https://github.com/ultraembedded/core_jpeg

author: mariush
author_rank: Super Contributor
timestamp: June 16, 2021, 08:19:08 pm
content: Another suggestion would be MPEG-2 ... maybe you can get a microcontroller with a hardware decoder... Wikipedia says that mpeg2 patents have expired everywhere except Malaysia where there's 3 patents..
ILI9486, SPI and RGB565 - Page 1
Forum section: electronics / general

author: madires
author_rank: Super Contributor
timestamp: June 27, 2020, 03:43:48 pm
content: Does someone have experience with using ILI9486 based displays? The datasheet notes that only RGB111 and RGB666 color schemes are available when the SPI interface is selected. But I've seen some code using RGB565 with the SPI interface. So I wonder if the datasheet is correct or not. Unfortunately I don't have an ILI9486 display module with SPI interface for testing and I'd like to keep my module with an 8-bit parallel bus unmodified.

author: dave j
author_rank: Regular Contributor
timestamp: June 27, 2020, 04:10:27 pm
content: Quote from: madires on June 27, 2020, 03:43:48 pmGoing bythis thread on githubthe datasheet is correct. Seethis postfor confirmation.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 17, 2021, 06:17:37 pm
content: Ah, I just happen to be wondering the exact same thing. I have received a couple of those 480x320 panels with an ILI9486 controller, and from the DS, I got the same thing as you did, but I've also seen source code that would still use 16bpp data using SPI. I guess those libs are all bogus?Have you finally gotten this to work, and if so, what format did you use?

author: madires
author_rank: Super Contributor
timestamp: June 17, 2021, 07:27:38 pm
content: Seems so. For SPI I use RGB666.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 17, 2021, 08:09:11 pm
content: OK, that's what I'm implementing. What clock rate did you use for SPI? From the DS, looks like 16MHz would be the maximum.

author: madires
author_rank: Super Contributor
timestamp: June 17, 2021, 08:30:00 pm
content: Just 8 MHz, but I wouldn't be surprised if you can go higher than 16 MHz.
How to use FatFs library for SD card communication?? - Page 1
Forum section: electronics / general

author: SmallHuz
author_rank: Contributor
timestamp: June 07, 2021, 04:40:12 am
content: Hello everyone,So I am trying to make a code for Atmega16 to write data in a file on an SD card for my final thesis. I was looking for a library that utilizes SPI routines and that can work along side its SD library and at the end settled on FatFs library for the thesis. In nut shell I know how everything should work thogether but I personally can not pull any info from the page and even tried to understand workings of the library but no luck so if anybody worked with that library and hase some tips and trick that would be great.Here is a link to library:http://elm-chan.org/fsw/ff/00index_e.htmlThanks in advance

author: SmallHuz
author_rank: Contributor
timestamp: June 07, 2021, 04:42:34 am
content: Connecting SD card to ATmega 16 is trivial. I am using SPI pins as UART pins are alredy used up for HC-05 bluetooth module.

author: thm_w
author_rank: Super Contributor
timestamp: June 08, 2021, 10:29:15 pm
content: https://eleccelerator.com/mmc-sd-card-and-fat-tutorial/https://forum.allaboutcircuits.com/threads/how-to-interface-sd-card-with-atmega32-with-help-of-fatfs.175216/

author: SmallHuz
author_rank: Contributor
timestamp: June 15, 2021, 07:10:53 pm
content: Thank you very much I will try with this.
How do you program an ATtiny10 with PICkit 4? - Page 1
Forum section: electronics / general

author: DigitalDeath
author_rank: Regular Contributor
timestamp: June 11, 2021, 03:03:03 am
content: How do you program an ATtiny10 with PICkit 4?Since they use a different protocol called TPI (Tiny Programming Interface) that uses a single wire for both input and output?I know about the USBasp programming but they tend to fail when the MIOSI pin is connected to other devices.Is there some settings os something I need to do to make it work?I'm new to this series and I mostly do STM32 so I'm not familiar with where the resources are.ThanksJohn.

author: ComradeXavier
author_rank: Contributor
timestamp: June 11, 2021, 01:13:05 pm
content: Start with Microchip'sPICkit 4 product page. There you will find links to documentation, including auser's guideand aquick start guide.

author: DigitalDeath
author_rank: Regular Contributor
timestamp: June 11, 2021, 01:28:16 pm
content: Quote from: ComradeXavier on June 11, 2021, 01:13:05 pmThis is not a regular AVR processor. It uses a different protocol for programming because it has a bidirectional pin instead of miso and mosi

author: ComradeXavier
author_rank: Contributor
timestamp: June 11, 2021, 01:49:59 pm
content: Quote from: DigitalDeath on June 11, 2021, 01:28:16 pmYou wrote:Quote from: DigitalDeath on June 11, 2021, 03:03:03 amThe resources you need are on Microchip's website. The quick start guide I linked has only two pages. On page 2 is a table of how to connect a PICkit 4 to devices with a variety of programming interfaces, including TPI (as used on the ATtiny10).You may also need to refer to theATtiny10 product pageanddatasheet. Section 1 (Pin Configuration) and Section 15 (Programming Interface) will contain any details specific to the TPI interface on the ATtiny10.

author: DigitalDeath
author_rank: Regular Contributor
timestamp: June 11, 2021, 11:10:55 pm
content: Quote from: ComradeXavier on June 11, 2021, 01:49:59 pmThis is an answer thank you.The first one sounded like "read the manual"

author: MarkR42
author_rank: Regular Contributor
timestamp: June 15, 2021, 11:06:01 am
content: I am just pleased that someone else is using the Attiny10. I use the usbasp arduino-based programmer and it works well. There is a lot you can do with 32 bytes of ram and 1/2k flash
PIC18F57K42 SPI DMA - Page 1
Forum section: electronics / general

author: Dajgoro
author_rank: Frequent Contributor
timestamp: June 15, 2021, 11:05:43 am
content: HelloI'm trying to trigger a DMA transfer in a interrupt to transfer a memory block to the SPI port.I don't need to read anything back just transmit periodically.I spent quite some time fiddling with it both by hand and using MCC settings but nothing.I think the issues might be related to the fact that the SPI has to be read in order to transmit.So how do I setup DMA to do this?I even found a tutorial that basically does the exact thing I'm trying, but after copying all the settings still no luck.What could I be doing wrong/forgetting?https://catcatcat.d-lan.dp.ua/mcc-k42-nastrojka-modulya-dma/
Microcontroller boards with USB protection diodes? - Page 1
Forum section: electronics / general

author: ledtester
author_rank: Super Contributor
timestamp: June 15, 2021, 02:18:44 am
content: Hi all!I was wondering if there are any microcontroller boards which have some sort of USB capability (e.g. either a USB-UART chip or the microcontroller itself has USB capability) and the board has USB protection diodes protecting the lines.I suppose I could just take the design files for something like a STM32 Bluepill and just add them, but if there was a module available for sale that already had them so much the better.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 15, 2021, 04:44:44 am
content: The EFM8UB3 Thunderboard shows a SP1001-04 ESD protection diode.and I see the EFM32 Happy Gecko Starter Kit shows PRTR5V0U2F ESD protection diode.

author: mac.6
author_rank: Regular Contributor
timestamp: June 15, 2021, 07:13:40 am
content: Any serious dev boards made by reputable manufacturer will have them (ie, no cheap blue/black/red pill)...

author: peter-h
author_rank: Super Contributor
timestamp: June 15, 2021, 02:18:56 pm
content: USB protection is best done with a sturdy standalone clamping device e.g. USBLC6-2Anything anybody can put on a uC chip is not going to cut the mustard, as they say
PIC32 SPI slave receive buffer is empty despite good data on the bus - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: July 19, 2021, 01:34:47 am
content: Hi,I made this posthttps://www.eevblog.com/forum/projects/pic32-spi-slave-calls-the-callback-function-but-the-receive-buffer-is-empty/in the project section and tried to move it here where it is more suitable but could not delete it from there.An admin maybe can move it over here?Thank you
AM572x development - Page 1
Forum section: electronics / general

author: salviador
author_rank: Regular Contributor
timestamp: June 10, 2021, 06:43:43 pm
content: I need "usbboot-stand-alone" for DFU USBwhere can I find this command on which package?I download "PROCESSOR-SDK-AM57X" but it doesn't exist.I desperately need to!
MPLAB Harmony V3 configuration to for SPI Slave - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: June 06, 2021, 04:49:02 pm
content: Hi,I am using MPLAB Harmony V3 and when I place the SPI "block" in the project graph, I can configure SPI to be configured in slave mode or master mode.But when I add the SPI Harmony driver block and connect it to the SPI peripheral block, it automatically changes the SPI peripheral block to master AND ALSO locks the peripheral block (grey it out) so you cannot change it back to Slave Mode.1) Why? It does not make any sense...2) How can I CONFIGURE and USE a full SPI Harmony driver in SLAVE mode?3) I could not find any proper sample code using Harmony 3 (the various ones are using only the PLIB or have too simple code or use DMA which I do not want to). Where can I find some proper code for receiving data as a slave?Thank you

author: ataradov
author_rank: Super Contributor
timestamp: June 06, 2021, 05:04:04 pm
content: "Driver" is a higher level interface with mutexes and request queue management. It is designed more for RTOS use. For master mode, it is easy to implement, since you have multiple tasks trying to talk to multiple devices on the same bus. But for the slave, it is not so easy and not really necessary, since slave functionality typically represents once device to the outside masters.You get all the APIs you need to work with the peripheral from the basic block, so just use that.PLIBs is what you want here. I don't understand the "too simple" part. If it does what is necessary, then why it is bad that it is simple?

author: ricko_uk
author_rank: Super Contributor
timestamp: June 06, 2021, 06:15:04 pm
content: Thank you Alex,I am using freeRTOS, and it would make it easier to switch via software between master and slave (the hardware can be configured in multiple ways). That is why I was hoping to us the driver.Are you saying that the Harmony Driver does not support at all the slave configuration?Thank you

author: ataradov
author_rank: Super Contributor
timestamp: June 06, 2021, 08:02:03 pm
content: No. It is not clear what that would even do. The driver handles and dispatched requests like "read so many bytes from slave #1". But for the slave you need to have the data in advance or just in time, since you don't know when the master may ask for it. And in many places you need to react differently based on the first few bytes received (a command or address, for example) So driver like this would be mostly useless.And dynamically switching between master and slave is also a pretty exotic requirement. So just stick with PLIBs, it would be much easier.

author: ricko_uk
author_rank: Super Contributor
timestamp: June 06, 2021, 08:04:39 pm
content: yes, you are right, totally makes sense!!!Thank you
Unusually Long Programming Times With ATmega328P and avrdude [SOLVED] - Page 1
Forum section: electronics / general

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 05, 2021, 08:42:50 am
content: I'm programming an ATmega328p using avrdude, and with a program size of 3074B, I am experiencing approximately 13 seconds of programming time. This is painfully slow when developing with the microcontroller. I've tried using both the internal oscillator, and an external oscillator both set at 8MHz. The `CKDIV8` fuse is also unprogrammed. I'm not sure what I am doing wrong, I don't remember programming the microcontroller being this slow when working with it in the past.

author: Ian.M
author_rank: Super Contributor
timestamp: June 05, 2021, 09:00:47 am
content: AVRdude supports a multitude of programmers + a few serial bootloaders, so unless you post what hardware you are using, how its hooked up, and your AVRdude command line, its unlikely anyone will be able to help . . .

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 05, 2021, 09:24:11 am
content: Code:avrdude -c atmelice_isp -p m328p -U flash:w:debug.hexavrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.01savrdude: Device signature = 0x1e950f (probably m328p)avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performedTo disable this feature, specify the -D option.avrdude: erasing chipavrdude: reading input file "debug.hex"avrdude: input file debug.hex auto detected as Intel Hexavrdude: writing flash (3074 bytes):Writing | ################################################## | 100% 12.57savrdude: 3074 bytes of flash writtenavrdude: verifying flash memory against debug.hex:avrdude: load data flash data from input file debug.hex:avrdude: input file debug.hex auto detected as Intel Hexavrdude: input file debug.hex contains 3074 bytesavrdude: reading on-chip flash data:Reading | ################################################## | 100% 13.06savrdude: verifying ...avrdude: 3074 bytes of flash verifiedavrdude: safemode: Fuses OK (E:FF, H:D9, L:E0)avrdude done. Thank you.As requested, here is the output of avrdude, and I am using an Atmel-ICE

author: Kalcifer
author_rank: Regular Contributor
timestamp: June 05, 2021, 08:27:32 pm
content: Solution found to be manually setting the `-B` option in avrdude to be `-B 1`. This gives a programming speed of about 0.16s. I don't know why the Atmel ICE wasn't automatically picking the fastest speed, but either way, solved.

author: Ian.M
author_rank: Super Contributor
timestamp: June 05, 2021, 09:29:08 pm
content: Hmm. Check the default_bitclock setting in the config file. See:https://www.nongnu.org/avrdude/user-manual/avrdude_11.html#AVRDUDE-Defaults
X9C103 changing to MAX5451 or MAX5389 - Page 1
Forum section: electronics / general

author: aless2056
author_rank: Contributor
timestamp: June 03, 2021, 08:49:19 pm
content: Guys, I'm going to exchange a digital potentiometer X9C103 that is used connected to the RT of an SG3525.The goal is to have more resolution, more steps since X9C103 is 100 steps and MAX5451 or MAX5389 is 256 steps.Controlling the X9C103 today is done by a PICF628A.The questions are as follows:1) The Max5451 or Max5389 look the same to me, I just see that the Max5389 is a newer item, I didn't see any difference between them in relation to the X9C103, the more experienced ones tell me.2) The uc is connected to X9C103 using this board below, in which I have 4 capacitors, I believe it is one for each IC input X9C103 in relation to ground and one on vdd, am I correct?The pins and outputs of the direct uc can I connect directly to the control pins of the IC Max5451 or Max5389, without putting a resistor or capacitor?

author: RES
author_rank: Regular Contributor
timestamp: June 04, 2021, 09:01:05 pm
content: The MAX5451 has shared U/D and INC pins (so toggle each pot/wiper with Chip Select pins), while the MAX5389 has separate control pins. Yes you can directly connect the control pins (5V).

author: aless2056
author_rank: Contributor
timestamp: June 04, 2021, 11:55:05 pm
content: As an example, remembering that I am a beginner in electronics. I'm going to use MAX5389 or MAX5451 in place of the RT resistor on an SG3525. As I know, as an example, which current leaves the SG3525 and passes through the RT, and where I find in the datasheet the maximum current of the resistance of the MAX5389.
Overriding the signal with FPGA - Page 1
Forum section: electronics / general

author: webhdx
author_rank: Newbie
timestamp: June 04, 2021, 09:32:50 am
content: I know the topic sounds lame but I'm just starting my journey with FPGA. So I wanted to replicate a particular console modchip. It's well documented and pretty straightforward so I got it working very quickly. It's basically emulating an SPI flash memory. In order to make it work I had to lift MISO pin of the original mask ROM chip to be sure only my device is sending the data on that line. As I said it's working great but lifting a pin is risky so I don't want anyone to do it. Some other modchips from the era could work without lifting the pin. They were "overriding" the signal somehow and it was not doing that by pulling CS line high to disable the chip. I'm wondering how is it done electrically? What will happen if two devices will start talking on the same line? Is it possible for my FPGA to "override" the original ROM data line?

author: ejeffrey
author_rank: Super Contributor
timestamp: June 04, 2021, 04:43:53 pm
content: What happens if two chips drive the same line is "who knows, but generally nothing good". Essentially you get a short circuit from Vcc to ground through the high side transistor of one chip and the low side of the other. One of them might win, or you could get an intermediate voltage. Power draw goes way up. You can also get weird time dependent glitches. It's possible to damage one or both chips, although malfunction is more common than damage.Some SPI flash chips have a RESET pin with an internal pullup and might be left floating on the PCB. If you are lucky enough to have that you can just force the target chip into reset while your mod chip is installed.Its possible if the target chip has relatively weak drivers and the mod chip has beefy output stages that you can just overpower it and things will work. It's not really ideal, but it can work. Disabling nCS would be work very well but is generally just as hard as lifting MISO.
Gooligum 32768 counter mode problem - Page 1
Forum section: electronics / general

author: yannickfrechette
author_rank: Newbie
timestamp: June 08, 2021, 08:09:47 am
content: I bought the PIC Training Boards 1 month ago. I am currently in the exercises on the timer0 and particularly on the counter mode. There seems to be a problem with watch crystal. I have installed the jp22 correctly but there is no oscillator response. The gp1 led lights up but without blinking. I tried with the 12f509 and the 12f629 and it was the same result. I checked the voltage on the gp2. He is at zero. There is no voltage either on the outputs and inputs of the cmos inverter. Could you inform me about the problemThank
GP15 on Raspberry Pi Pico - Page 1
Forum section: electronics / general

author: hamster_nz
author_rank: Super Contributor
timestamp: June 03, 2021, 08:56:01 am
content: It seems that on the B0 stepping of the Raspberry Pi Pico GP15 is somewhat unusable, and it is somewhat related to the USB functionality:Code:// After coming out of reset, the hardware expects 800us of LS_J (linestate J) time// before it will move to the connected state. However on a hub that broadcasts packets// for other devices this isn't the case. The plan here is to wait for the end of the bus// reset, force an LS_J for 1ms and then switch control back to the USB phy. Unfortunately// this requires us to use GPIO15 as there is no other way to force the input path.// We only need to force DP as DM can be left at zero. It will be gated off by GPIO// logic if it isn't func selected.See RP2040-E5 on page 642 of the datasheet (https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf) if interested.If anybody knows a quick easy way to get GP15 going again using the C SDK please let me know, as I have a Pico with a B0 part reflowed to a custom PCB, and really don't want to waste it.It is looking to be something to do with the overrides in GPIO15_CTRL (page 269) being set in in the masked ROM, but never reset.As of yet I haven't had the time to explore it. If I find a fix I'll add it here - hopefully it is old news, and everybody already knows this fix and I'm the last to know...

author: hamster_nz
author_rank: Super Contributor
timestamp: June 03, 2021, 11:54:16 am
content: There is a chance that might be just me... might have blown my GP15 pin, and miss-correlated it with this pin out picture, then went down a rabbit hole...

author: exe
author_rank: Unknown
timestamp: June 03, 2021, 01:22:52 pm
content: According to info here the pin still can be used:https://github.com/adafruit/circuitpython/issues/4034. I don't have rpi pico at hand to check that.

author: dave j
author_rank: Regular Contributor
timestamp: June 03, 2021, 02:36:55 pm
content: I've just checked it out on a B0 Pico reading GP15 using a program withpico_enable_stdio_usb(test 1)in CMakeFile.txt to redirect stdio via USB and it reads GP15 and prints results via USB OK.The tinyusb library included in the Pico SDK calls the fix in dcd_rp2040.c.