hybridfree/eevblog-posts huggingface dataset:
Obsolete Mitel/Zarlink part: MVA60041 - Page 1
Forum section: electronics / general

author: MarkMLl
author_rank: Frequent Contributor
timestamp: March 11, 2020, 08:33:11 am
content: Does anybody have any information at all on the MVA60041 microcontroller from Mitel (later Zarlink)? The only useful comment I've found was "I've got this weird chip from a Range Rover P38 central console that nobody's ever heard of"...MarkMLl

author: amyk
author_rank: Super Contributor
timestamp: March 13, 2020, 12:23:32 am
content: Unlikely to be a microcontroller.https://datasheet4u.com/datasheet-pdf/ZarlinkSemiconductor/MVA60000/pdf.php?id=538929

author: MarkMLl
author_rank: Frequent Contributor
timestamp: March 13, 2020, 09:03:07 am
content: Thanks very much. I'd missed that, probably because I was expecting it to be a microcontroller (although I'd got as far as thinking it odd that there was no sign of a crystal or resonator).I might end up sticking an analyser on it out of interest: it's collecting around 16 switch contacts and putting them onto a serial bus (believed to be 24-bit packets with clock, data and direction signals). It's controlled by a P38 Range Rover's BECM module, probably not directly visible to OBD.MarkMLl
Connecting Rpi to SSD1306 with no ACK - Page 1
Forum section: electronics / general

author: gmc
author_rank: Regular Contributor
timestamp: March 10, 2020, 02:04:05 pm
content: I got my hands a on bunch of SSD1306 OLED 128x64 displays which I would like to use with various RPi projects.After messing around with them for a few days with my Arduino I found out these OLED's dont send a ACK back. These seem to be common OLED's on eBay.On the Arduino site the author of the u8glib display library added a extra option to the library which fixes this:U8G_I2C_OPT_NO_ACKhttps://forum.arduino.cc/index.php?topic=219419.15The problem I'm having now is on the Rpi i2cdetect script does not detect the OLED, due to the no ack issue and also none of the standard libraries work.Has anyone else run into this problem for the Rpi. Are there any workarounds?

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 10, 2020, 02:31:11 pm
content: Can you not use the display in SPI mode instead? You can also use SPI on the RPi, and it will give you a lot less headaches. I2C without ACKs? Yuck.

author: gmc
author_rank: Regular Contributor
timestamp: March 10, 2020, 03:01:24 pm
content: The display only has sda / scl pins otherwise I would.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 10, 2020, 03:29:17 pm
content: Quote from: gmc on March 10, 2020, 03:01:24 pmThat sucks.You may try this:https://www.raspberrypi.org/forumsto ask whether you could configure I2C on the Pi to ignore ACKs, although I very highly doubt it.Anyway, any I2C device that doesn't handle ACK is obviously not I2C-compliant and is a piece of crap. You should just get a refund IMO(I've used displays with an SSD1306 controller, in SPI mode, and they were fine. Never used them in I2C mode though. I'm a bit surprised about the ACK thing.)

author: gmc
author_rank: Regular Contributor
timestamp: March 10, 2020, 03:30:36 pm
content: Found a hardware hack for these cheap ass OLED's.https://forum.arduino.cc/index.php?topic=635116.0Short pin 19 and 20 on the ribbon cable which will then make ACK work.For some reason they didnt connect ACK up, why I have no idea.Just tried it and it works 100%.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 10, 2020, 03:45:20 pm
content: Nice you found a fix, and given that your modules only support I2C, this wiring "bug" looks unacceptable to me. Crap design.
BSDL-file for discontinued/obsolete chips? - Page 1
Forum section: electronics / general

author: oh2ftu
author_rank: Regular Contributor
timestamp: March 10, 2020, 10:21:26 am
content: Hi,I'm looking for a BSDL file for a AD6528.I contacted AD, but they just replied "it's obsolete, last order date 2009". Gnaah.Has someone came across this or might be able to find one on the interwebs?AD's site says no.
Pic microcontroller programming type - Page 1
Forum section: electronics / general

author: ifrenide
author_rank: Regular Contributor
timestamp: March 09, 2020, 10:40:53 pm
content: Hello, I want to know, what type of programming used for Pic microcontrollers for example Pic 16f627,I mean what type the Vpp,Data,Clock,+v,GNd pins belong to?; for AVR microcontrollers we call it programming type SPI programming, How about Pic microcontrollers ?thank you.best regards.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 10, 2020, 01:05:41 am
content: Microchip calls that In-Circuit Serial Programming (ICSP).
kinetis pin labels and blinky  - Page 1
Forum section: electronics / general

author: benny
author_rank: Newbie
timestamp: March 08, 2020, 03:51:33 pm
content: Dear forum usersI have a question regarding mcuXpresso pin labels and a blinky.1) what are the lables for ?(se the included picture)2) and do I use the labels in the code below and how?Sorry if it is a stupide question but it's my first time using the kinetis line of microcontrollersThank you in advance and with best regards Ben<code>/* TODO: insert other definitions and declarations here. */static void delay(volatile uint32_t nof) {while(nof!=0) {__asm("NOP");nof--;}}/** @brief Application entry point.*/int main(void) {/* Init board hardware. */BOARD_InitBootPins();BOARD_InitBootClocks();BOARD_InitBootPeripherals();CLOCK_EnableClock(kCLOCK_PortC); /* enable clocks for port B */PORT_SetPinMux(PORTB, 9u, kPORT_MuxAsGpio);// setting pin PTB9 as an output/* Enter an infinite loop, just incrementing a counter. */while(1){GPIO_PinWrite(GPIOB, 9u, 1<<9u);delay(1000);GPIO_PinWrite(GPIOB, 9u, 0<<9u);}return 0 ;}</code>

author: luiHS
author_rank: Frequent Contributor
timestamp: March 09, 2020, 07:57:00 am
content: To write to your GPIO:GPIO_PortSet (BOARD_INITPINS_vibmotor_GPIO, 1U << BOARD_INITPINS_vibmotor_PIN); // ONGPIO_PortClear(BOARD_INITPINS_vibmotor_GPIO, 1U << BOARD_INITPINS_vibmotor_PIN); // OFFAnd if you need to read some GPIOGPIO_PinRead(BOARD_INITPINS_label_GPIO, BOARD_INITPINS_label_PIN)To write a more readable code or if you are going to use the same instruction several times in the program, you better assign it with a #define.#define MOTOR_ON GPIO_PortSet (BOARD_INITPINS_vibmotor_GPIO, 1U << BOARD_INITPINS_vibmotor_PIN);#define MOTOR_OFF GPIO_PortClear(BOARD_INITPINS_vibmotor_GPIO, 1U << BOARD_INITPINS_vibmotor_PIN);while(1){MOTOR_ONdelay(1000);MOTOR_OFF}

author: benny
author_rank: Newbie
timestamp: March 09, 2020, 11:49:54 am
content: DearThat did trick thank you!With best regards Ben
Toyota 93 ecm- reverse engineering - Page 1
Forum section: electronics / general

author: Cubah
author_rank: Newbie
timestamp: March 10, 2020, 07:43:24 pm
content: Hello,Does anybody have experience with Such old cars ECm reverse enginering? I mean pcb to schematic convertion. I know that Toyota never published schematics, I am really interested to have. The first I would like to reverse Toyota Soarer 93 ECM.Nice to hear your opinion or any help will be nice ...Jake

author: Rasz
author_rank: Super Contributor
timestamp: March 11, 2020, 08:37:44 am
content: ~$4Khttps://www.isensortech.com/couple hundred if sourced directly from China, ~double that with middle men likehttps://www.chinapcbcopy.com/but why would you want the diagram in the first place, its not like there is a vibrant market for factory ECU clones?

author: Lindley
author_rank: Regular Contributor
timestamp: March 11, 2020, 09:19:19 am
content: More of a challenge would be to design and build your own ECM, building a simulated engine test bed with sensors to show how the ECM works.

author: floobydust
author_rank: Super Contributor
timestamp: March 11, 2020, 09:51:08 am
content: I would first ID the semiconductors to see if you can get datasheets on them. Unknown IC's can make it too difficult to figure out and reverse engineer, so a schematic is not much use then.Nippon Denso liked to make custom ECU IC's, i.e. MAF sensor V/F, and use oddball Hitachi MCU.

author: Circlotron
author_rank: Super Contributor
timestamp: March 11, 2020, 11:48:46 am
content: Someone here might be able to point you in the right direction.https://pcmhacking.net/forums/index.php
ESP32 ADC-DMA: Bad Documentation - Page 1
Forum section: electronics / general

author: Jamie_A
author_rank: Contributor
timestamp: March 04, 2020, 10:46:54 am
content: I'm considering using the ESP32 for a project requiring 2 ADC channels sampling at a total of 100Ksps, and boy am I unimpressed with the documentation and APIs. The technical manual doesn't give enough detail on operating the ADC in DMA mode, and the API only exposes this functionality in I2S mode meaning only one channel enabled. Digging into the ESP-IDF HAL and low-level HAL code reveals a lot of unimplemented features. I comfortable rolling my own drivers if the technical manual wasn't missing the DMA-ADC section altogether...Am I missing something here? From my experience, tasks like this are trivial and well documented in STM32 and Nordic micros....

author: lucazader
author_rank: Regular Contributor
timestamp: March 05, 2020, 11:44:35 pm
content: Another important thing to note with the esp32 ADC's is that they have a linearity issue.I have never used the esp32 adc's but i remember seeing a few posts about serious non-linearity when i was doing a bit more dev work with the esp32.
Looking for at30tse002b thermal sensor C driver - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: March 02, 2020, 06:05:30 pm
content: Hello All,I have an at30tse002b thermal sensor to interface with a microcontroller. I am looking for a standalone c driver of this thermal sensor. If anyone have come across this, please suggest.Thanks and Regards,Muthu

author: rstofer
author_rank: Super Contributor
timestamp: March 02, 2020, 06:21:23 pm
content: I think the answer to your question is going to depend on which microcontroller. The sensor is just an I2C device with nothing special. The problem is, the I2C peripheral inside the microcontroller is unique to each microcontroller. I would spend my time searching for an I2C driver for your chosen microcontroller. In many cases, the factory provides this code in their libraries. Check for Application Notes for I2C with your microcontroller.
Reduce I2C power consumption - Page 1
Forum section: electronics / general

author: slugrustle
author_rank: Frequent Contributor
timestamp: October 21, 2018, 05:13:41 pm
content: I had the (probably old) idea to reduce the power consumption of an I2C bus by actively driving the high side of the pullup resistors using output pins on the MCU that serves as the master on the bus. Separate input pins are used to read the low side of the pullup resistors. See the attached diagram.During a master read sequence, the SDA pullup resistor would be kept high. When checking for clock stretching, the SCL pullup resistor would be kept high. Otherwise, the high side of these pullup resistors would be driven by the desired bus signal.Does anyone see problems with this scheme? Of course the fall times would be longer unless the input pins were switched between input mode and output low mode. In either case, I would bit bang this implementation and would adjust timings to meet the I2C spec across worst-case MCU oscillator tolerance.Edit: switching compression settings on attachment.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 21, 2018, 05:18:31 pm
content: Idle condition is normally high; what difference would this make?Tim

author: slugrustle
author_rank: Frequent Contributor
timestamp: October 21, 2018, 05:25:17 pm
content: The idea is that the waveforms look the same at the slave SDA and SCL pins, as well as at the master SDAi and SCLi pins. Instead of tying the pullup resistors directly to the rail, SCLo would go low during the low part of a clock pulse, and SDAo would go low for a low signal during a master write. This removes the cost of pulling 1mA or so through the pullup resistors in these situations.

author: malagas_on_fire
author_rank: Frequent Contributor
timestamp: October 21, 2018, 05:56:39 pm
content: a few tips on I2c power saving:- Less zero's:https://embeddedgurus.com/stack-overflow/2009/07/lowering-power-consumption-tip-1-avoid-zeros-on-the-i2c-bus/- The manual from Philips / Nexperia / NXP??? :https://www.nxp.com/docs/en/application-note/AN10216.pdfCheck Slide 65

author: slugrustle
author_rank: Frequent Contributor
timestamp: March 01, 2020, 10:03:22 pm
content: I did try this and was able to successfully control a Microchip MCP4551 digital potentiometer from a Holtek HT48R003 MCU. I connected SCL directly between the two chips since the MCP4551 does not clock stretch.
Is Android OS still a power hungry beast for embedded systems? - Page 1
Forum section: electronics / general

author: e100
author_rank: Frequent Contributor
timestamp: February 25, 2020, 02:10:07 am
content: Pondering the current state of the bicycle GPS computer & mapping gadgets (Wahoo, Garmin, Magellan, Lezyne etc.) there still seems to be huge gulf between what a mobile phone app can do and what a typical gadget app can do. It's like two different worlds. In some cases the gadget app requires the presence of a bluetooth link to a companion android/IOS app for advanced UI and navigation features.
Mecrisp Forth as a CMSIS-RTOS thread on a STM32WB55 dual Cortex-M with Wireless - Page 1
Forum section: electronics / general

author: techman-001
author_rank: Frequent Contributor
timestamp: February 21, 2020, 03:49:55 am
content: MecrispCube: Mecrisp Forth for the STM32WBThis is a fascinating GPL'd development by Peter Schmid which allows the use of advanced and complex STM32WB peripherals such as USB, and BLE etc with tools such as CubeIDE, HAL, CubeMX, while also providing the development interactivity of Forth.*http://spyr.ch/twiki/bin/view/Cosmac/ForthSTM32WB*https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-wireless-mcus/stm32wb-series/stm32wbx5.html*https://sourceforge.net/projects/mecrisp/files/mecrisp-stellaris-2.5.3.tar.gzSee the mecrisp-stellaris-2.5.3/stm32wb55 directory for the plain standalone Forth version.
Tricolor microcontroller led panel by atmega 88 that do not access - Page 1
Forum section: electronics / general

author: eletmoraes
author_rank: Newbie
timestamp: February 09, 2020, 02:03:11 pm
content: LED panel model -> F3 LIGHT with a total of 16 columns and 8 rows of LEDs. 5v power and controlled by an Atmega 88 and being excited by 2 TLC5940. I have 4 equal panels and some are with the TLC5940 (some are burned) and other panels are with the Atmega 88 burned. My question is whether I can make a copy of the good atmega and save it to the new integrated atmega 8If it is possible to copy the contents of the atmega 88 already recorded and record on the other virgin atmega the same content, if possible, which device I can use or who knows how to build a device that allows me to perform this procedure.I have 4 multiplexed LED panels controlled by atmega 8 and TLC5940 that one of the panels is good and the other 3 are with the atmega burned. What I need would be to use the good microcontroller as a reference to record the other burnt microcontrollers (buying the new atmega). It's possible ?

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 09, 2020, 05:45:52 pm
content: Most likely you will not be able to read the program memory of those microcontrollers. They will likely have the lock bits set to prevent this.If you want to try anyway and you have an Arduino handy then you can program it with firmware that will allow you to read/write the memory in the Atmel MCU using a program called avrdude.All of this is pretty advanced stuff so expect a lot of headaches if you have never done this sort of thing before.YouTube has a bunch of videos on this. Search it for "arduino isp programmer".
arduino text to o-scope decode - Page 1
Forum section: electronics / general

author: cyberwasp
author_rank: Contributor
timestamp: February 07, 2020, 02:44:04 am
content: Can someone point me to a sketch that I can use to send text to an O-scope. I'd like to test the SDS1202X-E scopes decode function. I ran across a youtube demo awhile ago and now I can't find it.TIA

author: Ian.M
author_rank: Super Contributor
timestamp: February 07, 2020, 07:13:49 am
content: Assuming an ATmega328P based Arduino, any sketch that outputs text to the serial console will do. e.g. Examples: 04.Communication: ASCIITableProbe D1 (TX). Note the output will be a logic level serial signal, which is inverted with respect to a true RS232 serial signal
Why so many different types of memory on STM32 eval boards? - Page 1
Forum section: electronics / general

author: barycentric
author_rank: Newbie
timestamp: February 05, 2020, 02:29:28 pm
content: 234567890-

author: andersm
author_rank: Super Contributor
timestamp: February 05, 2020, 02:54:14 pm
content: As the name says, it's an evaluation tool. It allows you to test as many features of the chip as possible. It's not meant to be a module you put into a product.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 05, 2020, 02:58:48 pm
content: Yep. All those memories have a different access bus and different characteristics in terms of latency/throughput. You may need any of them in a particular application, so eval boards just allow you to evaluate that without having to buy/connect anything else.

author: ataradov
author_rank: Super Contributor
timestamp: February 05, 2020, 06:55:29 pm
content: Also keep in mind that STM32H7 can't run real Linux.Usually Linux-based boards actually pick specific memory types and stick with them. There is often "the best kind".For MCUs the range of applications is wider, so having multiple memory types for evaluation is justified.

author: ajb
author_rank: Super Contributor
timestamp: February 05, 2020, 09:50:38 pm
content: One big reason is that LCD, which will need a frame buffer if it's using the built-in TFT interface. 640x480x3 (assuming 24bpp) = ~1MB, before accounting for any double buffering or working memory for images or transformations. So that alone means you definitely want some extra RAM. Plus you probably want some stuff to display on it, and the 2MB of built-in flash isn't going to go very far when it comes to storing even compressed images on top of your application requirements.

author: ataradov
author_rank: Super Contributor
timestamp: February 06, 2020, 04:59:59 am
content: Quote from: barycentric on February 06, 2020, 01:35:19 amI'm not sure, I'm not aware of their MPU line up. But you basically need to look for something based on Cortex-A."Embedded Linux" is really not worth it. You will have much better experience with FreeRTOS if you want to go the OS way.

author: andersm
author_rank: Super Contributor
timestamp: February 06, 2020, 06:53:08 am
content: Quote from: barycentric on February 06, 2020, 01:35:19 amThe STM32MP1 series features dual Cortex-A7 cores.
FV-1 single chip DSP - how does it compare to "regular" microcontrollers? - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: February 03, 2020, 04:17:29 am
content: I read about this standalone SDR based on the FV-1 audio DSP:https://circuitsalad.com/2015/06/19/comming-soon-stand-alone-software-defined-radio-baseband-demodulator-no-computer-required/The datasheet lists the performance at a pretty modest 6 MIPS, but that's obviously in an instruction set specifically designed for DSP. For that application, how many MIPS of (for example) STM32 is it equivalent to?

author: ehughes
author_rank: Frequent Contributor
timestamp: February 04, 2020, 04:56:46 pm
content: So....the FV-1 was essentially the same architecture as a old Alesis/Wavefront DSP that was specifically create for Audio/Guitar. You program in assembly language and it works a bit different than a normal CPU. There is one master loop. You essential start at the top of the code when a new sample is ready and have a fixed number of instructions afterwards. Little to no conditionals. It really is for time domain data flow processing.The original designer of the FV-1 worked on the Alesis chip and it was his baby. He passed away over 10 years ago and there were no new chips.For time domain processing, it would actually out perform many general purpose MCUs for certain tasks at a low clock rate. It is tuned from some very specific instructions. I actually got it to do more than a 100MHz cortex M4 for some DSP tasks.That being said, the SigmaDSP from Analog devices work essentially the same way except that has a lot more under the hook and is actively developed. It works the same way, you process per sample and have a fixed number of instructions until the next audio sample. It can do everything the FV-1 can and more.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 05, 2020, 01:31:45 pm
content: Quote from: ehughes on February 04, 2020, 04:56:46 pmI second that.The FV-1 was really a custom chip at the beginning. It's interesting but has limited processing abilities outside of its intended use (relatively simple DSP.) Its availability even for the short term is unknown.But for a hobby project, why not, you can sure do a lot of fun stuff with that, and it's fully integrated with very decent specs for audio processing. Anyone who'd like to do some audio (or otherwise low freq) signal processing with a single-chip solution and who doesn't really have any concern for volume production or availability could definitely be interested.I haven't seen how to get ahold of the development tools though?
Standard micro SD card slot? - Page 1
Forum section: electronics / general

author: profdc9
author_rank: Frequent Contributor
timestamp: March 02, 2020, 02:34:40 am
content: On web sites like Aliexpress or ebay you can often find standard, jellybean parts being sold by many vendors. For example, you can get things like USB connectors or PCB barrel jacks that have a common footprint so that you can be reasonably sure that designs using them can be easily replicated and parts easily replaced in the future.Are there any PCB SD, or preferably microSD, card slots that have common footprint? If anyone has any experience with a particular card slot that you could point me to, that would be helpful. I am hoping to find something not overly cheap as to survive multiple insertion cycles.Perhaps what I am looking for does not exist but if you know of any, please point them out. Thanks!

author: OwO
author_rank: Super Contributor
timestamp: March 02, 2020, 07:02:52 am
content: This one seems to be the most common:https://lcsc.com/products/Card-Sockets-Connectors_637.htmlfilter by card type "microsd memory card" and sort by availability. The top few ones all have the same footprint.

author: asmi
author_rank: Super Contributor
timestamp: March 02, 2020, 09:31:49 pm
content: That one looks a lot like this one:https://www.digikey.ca/product-detail/en/gct/MEM2075-00-140-01-A/2073-MEM2075-00-140-01-ACT-ND/9859685

author: luiHS
author_rank: Frequent Contributor
timestamp: March 02, 2020, 10:34:02 pm
content: This is the one that I install in my products, and it works very well. At 0.05 USD/pcs, from Chinese vendors.I think it is quite standard, because I have already bought it from several suppliers, and with small variations, but the footprint for the PCB is the same.

author: profdc9
author_rank: Frequent Contributor
timestamp: March 02, 2020, 11:48:25 pm
content: Ok, I can get some of this card type with my next JLCPCB order. Thanks all for your suggestions.
writing CC0 on SAMD20 appears to stall the timer - Page 1
Forum section: electronics / general

author: snarkysparky
author_rank: Frequent Contributor
timestamp: February 03, 2020, 01:54:42 pm
content: I am trying to use TC7 in match PWM mode with output WO.If i start the timer with CC0 and CC1 setup for an initial period and duty the output works.But if I try to change the period on the fly ( CC0 ) it appears to stall the timer. At least the output ceases to toggle.setup codeCode:// *******TC7 setup for match PWM waveform generation. Used for feed step motor driveREG_TC7_INTFLAG = 0x000000ff; // reset any interrupts pendingREG_TC7_CTRLA = 0x000000; // disable TC7 to make config changeswhile(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);REG_TC7_CTRLBSET = TC_CTRLBSET_DIR; // count upwhile(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);REG_TC7_CTRLA = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_WAVEGEN_MPWM; // 16 bit mode - match frequency generatorwhile(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);REG_TC7_INTENSET = TC_INTENSET_MC0; // no interrupt routine. used as a flag for setting CC0 register immediately after matchwhile(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);REG_TC7_CTRLC = TC_CTRLC_CPTEN1;while(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);//?REG_TC7_CTRLA |= TC_CTRLA_ENABLE;while(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);In a fast loop I try to write CC0 immediately after a match so the new CC0 value will still be above the current count.Code:if(REG_TC7_INTFLAG & TC_INTFLAG_MC0) // check for MC0 match{REG_TC7_INTFLAG = TC_INTFLAG_MC0; // writing should clear..if(TC7CC0HasNewValueFlag) // must write new CC0 value immediately after rollover of MC1{TC7CC0HasNewValueFlag = 0;REG_TC7_COUNT16_CC0 = FeedMotorRealTimeCCVal;while(REG_TC7_STATUS & TC_STATUS_SYNCBUSY);}}All I want to do is change the output frequency via setting CC0.Thanks

author: snarkysparky
author_rank: Frequent Contributor
timestamp: February 03, 2020, 02:59:52 pm
content: I fixed it.In MPWM mode CC0 is the period and CC1 is the on time. My code was suppose to double CC0 before writing to the register.As it was operating CC0 and CC1 were getting the same value. So no outputThis fixed ..........REG_TC7_COUNT16_CC0 = (FeedMotorRealTimeCCVal << 1);Funny how asking the question makes you figure it out.

author: mikerj
author_rank: Super Contributor
timestamp: February 03, 2020, 04:37:19 pm
content: Quote from: snarkysparky on February 03, 2020, 02:59:52 pmLost count of the number of times I've been part way through explaining a problem to a colleague at work and had a epiphany. It's part of the development process, for me at least.

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 03, 2020, 10:41:55 pm
content: Rubber duck debuggingworks.I think it has something to do with having to clean up our thoughts into a simple form to describe it out loud, and how that process makes solutions stand out.
python connection FT2232D problem - Page 1
Forum section: electronics / general

author: blackberryer
author_rank: Newbie
timestamp: February 03, 2020, 09:42:23 am
content: I connected the FT2232D with python and can detect the device ID, but the problem of open failure occurs.Channel A of FT2232D is used for JATG to download the program to FPGA, and channel B is used for 245 FIFO mode to communicate with FPGA.The driver settings are shown in the screenshot（driver-set.png） below.
Padauk Micro ADC - Page 1
Forum section: electronics / general

author: epicode
author_rank: Newbie
timestamp: February 01, 2020, 02:50:54 pm
content: Hello, I am trying to use a padauk PMS134 microcontroller to sample a voltage using the ADC and display it on a 7 segment display which I was able to control without any problem but I followed the instructions in the datasheet on using the ADC (http://www.padauk.com.tw/upload/doc/PMS133,%20PMS134_datasheet_v103_EN_20181113.pdf- page 64-67) and it seems you get two bytes result and I could not find a way to convert that into a number so I can multiply it when using a voltage divider or get the individual digits to control the 7 segment display.I am using padauk mini-c and the official framework and I've checked the documentation and could not find anything so if anyone has any experience with the framework and has any idea how to use those to bytes to control a 7 segment display your help will be very appreciated

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 02, 2020, 02:37:51 pm
content: I don't have a Padauk, but let me try to help anyway.At 12 bit resolution,ADCRHwill contain the four high bits of the result (value 0..15).ADCRLwill contain the low 8 bits of the result (value 0..255). So, logically, the 12-bit ADC sample value (0..4095) is ADCRH<<4 + ADCRL.The way the Padauk example does it,Code:WORD sample; // 16-bit result variableAD_START = 1; // Start ADC conversionwhile (!AD_DONE) NULL; // Wait for conversion to completesample$1 = ADCRH; // High byte of conversion resultsample$0 = ADCRL; // Low byte of conversion resultis that it stores the high byte of the conversion result to the high byte of the sample word; then the low byte. (The$nsuffix selects the byte in a multibyte variable.)Let's say you want to convert this 12-bit value to four individual digits, 0..9. The simplest option is to use a subtraction loop:Code:byte thousands, hundreds, tens, ones;word value;value = sample;thousands = 0;hundreds = 0;tens = 0;ones = 0;while (value >= 1000) {thousands++;value -= 1000;}while (value >= 100) {hundreds++;value -= 100;}while (value >= 10) {tens++;value -= 10;}ones = value;This, however, produces leading zeroes. To take care of those, you use something like this:Code:if (sample >= 1000) {// Display 'thousands' digit} else {// Clear 'thousands' digit}if (sample >= 100) {// Display 'hundreds' digit} else {// Clear 'hundreds' digit}if (sample >= 10) {// Display 'tens' digit} else {// Clear 'tens' digit}// Display 'ones' digitor, if you control the display from least significant digit upwards,Code:// Display 'ones' digitif (sample >= 10) {// Display 'tens' digitif (sample >= 100) {// Display 'hundreds' digitif (sample >= 1000) {// Display 'thousands' digit} else {// Clear one digit (thousands)}} else {// Clear two digits (hundreds and thousands)}} else {// Clear three digits (tens, hundreds, and thousands)}
Is it possible to customize ST Link Utility tool? - Page 1
Forum section: electronics / general

author: Red_Micro
author_rank: Regular Contributor
timestamp: January 31, 2020, 03:10:20 pm
content: Hi,Probably the answer to my question is NO, but I don't lose anything by asking.To program an STM32 micro, I usually follow these steps (see attachment).1. Make sure the hex file is loaded2. Connect to the target3. Full chip erase4. Program verifyWhat I'd like is to build a GUI to do these steps automatically with just one button instead of performing each task separately. It's like changing the skin of the ST link by another one that has only one button and throws a message indicating when the programming is done.

author: techman-001
author_rank: Frequent Contributor
timestamp: January 31, 2020, 03:35:14 pm
content: Quote from: Red_Micro on January 31, 2020, 03:10:20 pmIf you use a Makefile you could add something like this to it :Code:st-flash erasest-flash write program-image.bin 0x08000000

author: lucazader
author_rank: Regular Contributor
timestamp: February 01, 2020, 06:26:03 am
content: You can also use the newer version of the software STMCubeProgrammer. Which also comes with a handy CLI interface so you can write nice scripts.I use it to flash firmware onto test devices for quick testing (not debugging) in vscode for example

author: aldi
author_rank: Contributor
timestamp: February 01, 2020, 11:11:40 am
content: The older versions should also have a CLI. I've used them in a c# program.

author: ajb
author_rank: Super Contributor
timestamp: February 02, 2020, 06:24:04 am
content: See Section 4 here:https://www.st.com/resource/en/user_manual/cd00262073.pdf
where to connect External oscillator output in ATMEGA328PB  - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: January 26, 2020, 01:56:40 pm
content: Hi,I want to use 16MHz external oscillator not Crystal, with my ATMEGA328PB microcontroller. I am wondering where the external oscillator output should be connected.There are EXTCLK pin and XTAL1 & 2 pin. I don't see any design with external oscillator for AVR micrcontrollers. Please suggestThanks and Regards,Muthu

author: up8051
author_rank: Frequent Contributor
timestamp: January 26, 2020, 07:19:02 pm
content: XTAL1

author: newbrain
author_rank: Super Contributor
timestamp: January 26, 2020, 07:37:20 pm
content: Maybe there aren't many design with an external oscillator, but have you looked at thedata sheet?It explicitly mention using an external clock (chapter 11.7), connected to the EXTCLK pin. By looking at the diagram in 11.1, we come to know that the EXTCLK pin is just XTAL1, there is no separate clock input pin.Make sure to correctly set the fuses to 0000.

author: muthukural001
author_rank: Regular Contributor
timestamp: January 28, 2020, 05:07:19 pm
content: Thanks guys...
Debugging of ST Controller - Page 1
Forum section: electronics / general

author: nallamuthu
author_rank: Newbie
timestamp: January 27, 2020, 01:53:10 pm
content: Good Evening,As I am trying to debug the program from STM32L072CZ controller using ST-Link/V2 by using the software of Keil and AC6. I am getting the error as No target device found. Can anyone suggest now to debug the program.

author: rhodges
author_rank: Frequent Contributor
timestamp: January 27, 2020, 05:05:14 pm
content: First, make sure BOOT0 is low.Look at pages 50 and 53 of the datasheet. Pins 34 and 37 are primary for A13 and A14. SWDIO and SWCLK are alternate functions. I would expect them to be enabled until you choose A13 and A14 GPIO, but it looks like you have to enable them yourself. Page 53 shows.that you want AF0 for both.I had the other problem. I accidentally turned off SWDIO and SWCLK on stm32f030 during the GPIO init.

author: techman-001
author_rank: Frequent Contributor
timestamp: January 27, 2020, 10:48:45 pm
content: Quote from: rhodges on January 27, 2020, 05:05:14 pmSo did IHowever I found OPENOCD still erased the chip if started during the short period after mcu reset and before my user program disabled SWDIO and SWCLK. It was a bit hit and miss but did get me to thinking "what have I done to cause this? "

author: kamtar
author_rank: Regular Contributor
timestamp: January 28, 2020, 01:56:03 am
content: Quote from: techman-001 on January 27, 2020, 10:48:45 pmThe easiest way to resolve this is to switch into bootloader mode (that's why it's always useful to have pulldown on BOOT0 if you can).
SAM4E - understanding NAND interface ONFI - Page 1
Forum section: electronics / general

author: hsn93
author_rank: Regular Contributor
timestamp: February 26, 2020, 12:58:14 pm
content: Im trying to understand how NAND interface ONFI 1.0 works comparing (code, datasheets) from ready ASF framework example (microchip)the development board : SAM4E XPlained Prowhich has Static Memory Controller SMC with programmable SETUP,PULSE, HOLD signals.NAND CHip: MT29Fmicron NAND flash..Main clock 120MHzand in the function of nand_flash_raw_initializeCode:/* Configure SMC interface for NAND Flash */smc_set_setup_timing(SMC, BOARD_NAND_CS, CONF_NF_SETUP_TIMING);smc_set_pulse_timing(SMC, BOARD_NAND_CS, CONF_NF_PULSE_TIMING);smc_set_cycle_timing(SMC, BOARD_NAND_CS, CONF_NF_CYCLE_TIMING);the timing definition as follows:Code:/* Access timing for NAND */#define CONF_NF_SETUP_TIMING (SMC_SETUP_NWE_SETUP(0) \| SMC_SETUP_NCS_WR_SETUP(1) \| SMC_SETUP_NRD_SETUP(0) \| SMC_SETUP_NCS_RD_SETUP(1))#define CONF_NF_PULSE_TIMING (SMC_PULSE_NWE_PULSE(2) \| SMC_PULSE_NCS_WR_PULSE(3) \| SMC_PULSE_NRD_PULSE(4) \| SMC_PULSE_NCS_RD_PULSE(4))#define CONF_NF_CYCLE_TIMING (SMC_CYCLE_NWE_CYCLE(4) \| SMC_CYCLE_NRD_CYCLE(7))SMC_MODE.READ_MODE = 1 (ie Read is Controlled by NRD)from the above code and what i understand the following picture:also following table (based on the code above provided by ASF)now for NAND chip i've the following table:now im actually comparing my understanding with the table above. to make it short i'll just ask 3 questions that im not sure about:Q1: CE# to high Z .. the datasheet is assuring me that the data pins (D0-7) will go to High-Z within 50nS. however i've NCS_RD_HOLD (16nS) .. its a problem if the (host controller) tried to issue command immediately after reading from NAND as both are trying to control the signal !?Q2: the datasheet of microcontroller + code has much lower timing control than the NAND chip (there are just lots of timings in the NAND) .. i don't know which ones i should care about and or considered critical..Q3: CE# access time is 25nS .. and the software has (NRD_SETUP 0) (NCS_RD_setup 1 = 8.3nS).. if we calculate the CE# access time it will be 25nS .. i can see there is no margin here is that okay? why not have NCS_RD_SETUP = 0 ?

author: hsn93
author_rank: Regular Contributor
timestamp: March 02, 2020, 12:35:56 pm
content: i actually found that it get more confusing and complicated from AC characteristics of the host controllerthis tables makes it worse for my understanding .. isn't that code running out of timing spec now?
Raspberry UART - Page 1
Forum section: electronics / general

author: luiHS
author_rank: Frequent Contributor
timestamp: January 23, 2020, 09:24:35 am
content: Hi.I need to make a program for serial port communications with the Raspberry. I've been reading that the Raspberry has two UARTs; the Mini UART and the PL011.1.- The mini UART (/dev/ttyS0) is dependent on the frequency of the core VPU, which can vary according to the processor load, and therefore could be unstable and fail.2.- On the other hand, using the PL011 (/dev/ttyAMA0) implies having to disable Bluetooth.What UART do you usually use with the Raspberry that is not a problem ?, is to communicate at 115200 baud with a Kinetis MK66 microcontroller, I have doubts if it is reliable to use the mini UART.Regards

author: ebclr
author_rank: Super Contributor
timestamp: January 23, 2020, 12:12:08 pm
content: You can attach a USB 232 cable on the USB port, Will be the 3rd option

author: Siwastaja
author_rank: Super Contributor
timestamp: January 23, 2020, 12:17:48 pm
content: On Raspi3, I have used /dev/serial0 reliably, I think the key was to set force_turbo in /boot/config.txt, which removes CPU frequency throttling, of course increasing power dissipation, but on Raspi3, this won't cause thermal issues unless you have a tight, closed box with very poor cooling.Don't know how it's on Raspi4, though.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: January 23, 2020, 12:51:30 pm
content: Quote from: luiHS on January 23, 2020, 09:24:35 amReally? Wow, the list of RPi hardwareissuesis a never ending story. Use a good SBC, an Orange Pi PC is not only better but also cheaper.https://www.aliexpress.com/item/32448079125.html

author: johnkenyon
author_rank: Regular Contributor
timestamp: January 23, 2020, 01:08:47 pm
content: You could attach a UART to the I2C or SPI pins.Do a search for a "i2c UART" and/or "SPI UART".This yields things like the MAX3107 (single serial port with 128byte FIFO).I'm sure I've seen single chip 4 and 8 port devices.Another place to look is in the Linux kernel source.Looking at /usr/src/linux/drivers/tty/serial/Kconfig revealed support (from at least 4.4.x onwards) for the following:SERIAL_MAX310XSupported ICs are MAX3107, MAX3108, MAX3109, MAX14830.Each IC contains 128 words each of receive and transmit FIFOthat can be controlled through I2C or high-speed SPI."SERIAL_SC16IS7XXSupported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752, SC16IS760 and SC16IS762.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 23, 2020, 06:45:45 pm
content: You can refer to that:https://www.raspberrypi.org/documentation/configuration/uart.mdI think the RPi4 has the same limitation.As said in the link, you can either disable BT if you don't use it, or switch BT to the mini-uart instead.

author: luiHS
author_rank: Frequent Contributor
timestamp: January 24, 2020, 06:10:45 am
content: Thanks to everyone for your replies.I've tried both options, Mini UART and PL011, and both seem to work fine. I will probably use the PL011, because at this moment I don't need Bluetooth, I can use WIFI for wireless applications.
ESP8266 causing my ISP router to crash/reboot - Page 1
Forum section: electronics / general

author: gg64
author_rank: Regular Contributor
timestamp: January 19, 2020, 01:22:45 pm
content: Hello there,So I bought an ESP8266 recently off aliexpress, get the IDE working, did the hello world. All fine so far.I got my gas sensor working and giving me the result through the serial port (to check only).I tried some code to make it emit several wifi beacon, so far so good everything seems fine.Then I decided to do what I wanted to do from the beginning, that is to broadcast the sensor results through a wifi beacon name, and call the day.So I did that. But I noticed something strange and easily repeated: this is crashing my ISP (aka rebooting) router when I am underneath 5 meters (I did not tested further away yet).Can this be due to a bad rf insulation ? Or this bug listed here ? :https://www.eevblog.com/forum/microcontrollers/esp32-esp8266-three-remote-attacks/msg2663082/#msg2663082Here is my code:https://github.com/gg64du02/gas_wifi_beacon_no_serial_no_delayWhat do you guys think ?EDIT: the bug I was talking about is the 3rd listed, and no it does not seem to be the case.Since it is crashing/reboot the ISP box not the ESP8266.

author: OwO
author_rank: Super Contributor
timestamp: January 19, 2020, 04:56:15 pm
content: How often are you sending beacons? If there are too many unique names or mac addresses it's pretty similar to a beacon flood. Either way the ISP supplied router has shitty and exploitable firmware and I'd recommend turning off its wifi and using a separate wifi router.Maybe try using ad-hoc mode and sending normal IP packets instead. It'll annoy the neighbors less.

author: gg64
author_rank: Regular Contributor
timestamp: January 19, 2020, 06:55:56 pm
content: Well, there is only one delay(1) which is supposed to be 1ms. I can check with wireshark.I did not know that was an attack vector. I thought I found a really weird CVE, but nope.

author: gg64
author_rank: Regular Contributor
timestamp: January 20, 2020, 01:26:25 am
content: Ok, after doing some wireshark it turns out for a sample on one second, i got about : (18702 - 18509 + 1 =) 194 beacons.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: January 22, 2020, 07:38:48 am
content: There's no need to beacon that frequently. Eventhe ESP32 SSID rickrollersends the normal 10 beacons per SSID per second. The modem vendor probably didn't test against such a high rate.It's also a fascinating bug though. Perhaps the vendor would be interested. Or more likely they will be too busy making a slightly different version with even more bugs.

author: Jeroen3
author_rank: Super Contributor
timestamp: January 22, 2020, 08:05:58 am
content: What ISP router do you have?
PIC16F15xxx - Two failures in two days? - Page 1
Forum section: electronics / general

author: Ondre
author_rank: Unknown
timestamp: January 17, 2020, 03:10:52 pm
content: Hi,I'm a bit worried about having I/O pins fail on two different microcontroller projects using PIC16F15xxx within two days. I'm regularly designing PIC based circuits for at least the last 10 years and this never happened to me before. I have to admit, that beyond using an ESD mat, I'm not overly precautious when it comes to handling my circuits. So maybe, I was just lucky until now?Anyway, I wanted to know if any of you have had similar experience with these micros in particular. So here are some details:Project 1:PIC16F15356, port RA0 failed (stuck low). It is connected to the gate of a MOSFET via a 100 Ohm resistor. This MOSFET switches a highside MOSFET. The source of it connects a resistive load to ground and there is an tvs diode on this output. If it was for this thing failing only, I wouldn't be too worried. It got pushed around on the bench a lot over the last couple of month. After replacing the micro, it now works fine again.Project 2:PIC16F15354, port RA5 failed (also stuck low). The pin is connected to the output of an 74AHC1G14 via a 1k resistor. Now this one really puzzles me. This is a project for work and I assembled it carefully and put it into a case after assembly. The whole circuit consists of 90% input protection. The pin failed during debugging the firmware, just from one moment to the next.In both cases the supply voltage for the micro was 5V (using linear regulator) and the same ICD3 was involved in programming and debugging (and also the same person, of course)Just bad luck or am I doing something wrong here?Your thoughts on this are very much appreciatedCheersOndre

author: rhodges
author_rank: Frequent Contributor
timestamp: January 17, 2020, 05:30:20 pm
content: I am mainly a software guy, so this is just a guess... Could it be capacitive coupling from your high side MOSFET and the driver FET?

author: Ondre
author_rank: Unknown
timestamp: January 17, 2020, 06:05:36 pm
content: Well, it could be. There is not too much separation between the trace that drives the gate and the high side potential, but this "high side" voltage is only 12V. But it's a good point anyway. I should check if there is some dirt or other residues on the PCB.
[SAMC] runs with any oscillator clock divider but 1 so no 48MHz - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: January 27, 2020, 08:35:35 pm
content: I have been experimenting with setting my SAMC dev board to different clock rates and this works fine until I try the divide by 1 and it just does nothing so the maximum I can run is 24MHz. Not in dire need of the full 48MHz but just why?

author: newbrain
author_rank: Super Contributor
timestamp: January 27, 2020, 08:47:04 pm
content: Never used SAMC, I think the resident expert is ataradov, but:Are you setting the right amount of wait states for the flash?From the genericdatasheet (SAMC 20/21), you need 2 wait states for 48 MHz (chapter 45.11).

author: Simon
author_rank: Unknown
timestamp: January 27, 2020, 08:52:38 pm
content: No I have not set any wait states, funny enough if you have a clock section that does not alert you to something explained hundreds of pages later you are unlikely to ever find it. thank you. I take it there are settings in the registers of the NVMCTRL that need changing which i am looking at now.

author: Simon
author_rank: Unknown
timestamp: January 27, 2020, 09:14:11 pm
content: Sorted thank you. So now I can pin toggle at 4.8MHz

author: Simon
author_rank: Unknown
timestamp: January 27, 2020, 09:20:50 pm
content: So table 45.11:0WS 1WS 2WS19MHz 38MHz 48MHzdoes this mean up to 19MHz 0 wait states, up to 38MHz 1WS and up to 48MHz 2 WS. So i was just lucky to be getting it working at 24MHz with 0WS?

author: ataradov
author_rank: Super Contributor
timestamp: January 27, 2020, 09:41:42 pm
content: Quote from: Simon on January 27, 2020, 09:20:50 pmThis is correct.Quote from: Simon on January 27, 2020, 09:20:50 pmSomething like this. You did not test it at the whole range of temperatures and voltages. Generally parameters can be stretched quite a bit of you have a fixed voltage and a room temperature.

author: Simon
author_rank: Unknown
timestamp: January 27, 2020, 09:43:33 pm
content: Yes that is what i thought. i was only 25% over the speed in a cool room at 5V so best case scenario.