hybridfree/eevblog-posts huggingface dataset:
Features in Automotive - Page 1
Forum section: electronics / general

author: sangar
author_rank: Regular Contributor
timestamp: November 21, 2018, 04:39:33 pm
content: Hi All,I have looked into some of the Automotive features that are available in the car...They are1.Collision warningthat helps the driver to keep a safe distance from the front vehicle...2.Object detection, specifically, whether it is a pedestrian crossing or Animal crossing3.Median/divider detection4.Traffic sign board detectionOther than collision warning which needs LIDAR technology to tell the object distance, all the above require an image sensor with a camera to capture an image and do some processing in ISP...But, I wonder that how the system has the knowledge to tell the things...I mean, for example, in the object detection feature, how it tells the object is a pedestrian is crossing (or) an animal crossing...Is it a kind of machine learning?... Please suggestThanks,Sangar

author: Scrts
author_rank: Frequent Contributor
timestamp: November 21, 2018, 05:59:36 pm
content: Correct, Computer Vision & Machine Learning. Lots of it. Petabytes of data.

author: ale500
author_rank: Frequent Contributor
timestamp: November 21, 2018, 06:33:58 pm
content: Object detection is also done with RADARs for automatic cruise control and for lane change assistance, blind stop detection, cross traffic detection.

author: sangar
author_rank: Regular Contributor
timestamp: November 22, 2018, 05:20:13 am
content: Hi,I found another interesting feature, Pothole detection...But I am not sure how it works...Is it same capturing an image of the road ahead and analyse (again machine learning) it to see potholes are there and tells the type of potholes (Or) any specific sensor which tells potholes...

author: sangar
author_rank: Regular Contributor
timestamp: November 22, 2018, 12:10:31 pm
content: Hi,I have the following question,Traffic sign detection, Humb detection, Pothole detection and signboard detection: all these features exploit an image captured by a single camera which sits on the front mirror...(Or)multiple cameras with different fps have to be in place for the above features...Please let me know...And suggest any source to know the hardware being used in Automotive...Thanks,Sangar
PIC18F46K42 xpress EVAL Board - Page 1
Forum section: electronics / general

author: arul
author_rank: Regular Contributor
timestamp: November 20, 2018, 12:12:04 pm
content: Hi,I recently bought a MPLAB Xpress evaluation kit for PIC18F46K42. Now i know i can just drag and drop the hex file in order to program it. I have doubt. After programming, the program LED(Red) is glow continuously or else just blink that programming moment only?Now i am wrote LED toggle program on mplab cloud ide and am setup the oscillator system and output configuration settings using MCC. Now that corresponding LED was continuously glow not yet toggle. In that same program am wrote on mplab x ide also, but that same thing only i got.#define IO_RA0_Toggle() do { LATAbits.LATA0 = ~LATAbits.LATA0; } while(0) /// pin_manager.h///////main loop////////////while (1){IO_RA0_Toggle();delay(50);}////////////////////////////Please let me know

author: H.O
author_rank: Frequent Contributor
timestamp: November 20, 2018, 12:34:44 pm
content: Male sure the coresponding bit in the ANSEL register is cleared. It's not on POR.

author: arul
author_rank: Regular Contributor
timestamp: November 20, 2018, 01:18:49 pm
content: Hi #H.O,I am sure, cleared the corresponding ANSEL bit in the pin module setup.

author: JackJones
author_rank: Regular Contributor
timestamp: November 20, 2018, 02:03:13 pm
content: Quote from: arul on November 20, 2018, 12:12:04 pmI think your delay just might be too fast, thus appearing to glow continuously. Try something a lot larger.

author: technix
author_rank: Super Contributor
timestamp: November 20, 2018, 04:23:07 pm
content: Quote from: JackJones on November 20, 2018, 02:03:13 pmOr just hook a scope on it. Actually one of the test I would try is leave out the delay and hook that pin to a frequency counter.

author: arul
author_rank: Regular Contributor
timestamp: November 21, 2018, 08:19:24 am
content: HiThank you all...Now I am increasing more delay. I can seen the toggle.
Analog Switch Control with STM32F7 - Page 1
Forum section: electronics / general

author: A.Ersoz
author_rank: Regular Contributor
timestamp: November 20, 2018, 08:17:07 pm
content: Hello guys,A normally open and a normally closed switches were connected to one of the pin of the STM32F767ZI. So, my aim is that when the NO switch is closed, NC switch should be open. Do you have any idea to control them with one output of the microprocessor?Thanks

author: newbrain
author_rank: Super Contributor
timestamp: November 20, 2018, 08:45:46 pm
content: If this analogue switch is controlled simply via the level of GPIO pins, it is possible to set and reset atomically and simultaneously (with a single write) any combination of pins via the use of the GPIOx_BSRR (Bit Set and Reset Register).If only one pin is available, and you need opposite logic level, a single inverter gate should suffice; they also come insinglepackages, if none is left over form other logic.If the analogue switch is driven in some other other way, then please describe it.Is it still the HV2901?

author: Siwastaja
author_rank: Super Contributor
timestamp: November 20, 2018, 09:09:20 pm
content: Microcontroller is designed exactly to do that: control the IO the way you need. For example, if you need a deadtime for break-before-make operation, just turn the GPIO bits on/off in your desired order, with a small delay inbetween. But for this to be easy and straightforward, you need separate IOs.Is it really possible you are out of IO on such a large device, and need to saveonepin by combining the control of two switches to one IO?We need more info.

author: newbrain
author_rank: Super Contributor
timestamp: November 20, 2018, 09:54:17 pm
content: Quote from: Siwastaja on November 20, 2018, 09:09:20 pmQFT.

author: A.Ersoz
author_rank: Regular Contributor
timestamp: November 20, 2018, 11:41:24 pm
content: QuoteI get result with using this register. Thank you newbrain!I just write codeCode:HAL_GPIO_WritePin(SW_1_GPIO_Port, SW_1_Pin, GPIO_PIN_SET);.QuoteI changed in to PS393ESE one. Now, everything is clear and easy. But at the same time I am looking for another analog switch IC consisting more than four switches and smaller package.QuoteActually, the advantage is in the circuit that the switches default conditions are reverse. So, just one pin setting triggers activating one of them and closing the other one.Thank you guys!
PSoC Maximum Frequency - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: November 20, 2018, 05:21:49 am
content: Hi all,I'm working on CY8C5888, and I have a few questions regarding to PSoC's maximum IO frequency.My intended voltage is 2.5V, therefore according to DS, the maximum input freq is 33MHz, and the maximum output freq is 20MHz.Now the two questions:1. 33MHz is 66M transitions per sec, can I clock in a data at 49.152Mbps (no more than 49.152M trans/s) with a 24.576MHz clock with soft core DDR?2. The output Tr/Tf is 6ns max. Can I output short pulses down to 10ns with no more than 6.144Mbps/12.288M tran/s (tested with scope, works, but only at room temp)?I know I'm pushing the boundaries, but I want to know if it is possible -- it does not violate datasheet timing, but it is vague on frequency limits.Thanks.
Twist the same JTAG pinout into fitting almost everything: is it a good idea? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: November 19, 2018, 08:23:39 pm
content: I found myself getting a bit of habit here: I am using the same pinout, a modified ARM CoreDebug 1.27mm 2x5 connector, for almost all chips that uses JTAG, regardless of what it might be. I have even designed adapters for various debug pods to make them fit the ARM CoreDebug paradigm. Is that a good design habit, or should I shake it ASAP?Here is the pinout I am using:VDD12JTAG_TMS/SWD_DIO/C2_DQ/SJTAG_DQUART_TX/USB_D-34JTAG_TCK/SWD_CLK/C2_CK/SBW_TCKUART_RX/USB_D+56JTAG_TDO/SWD_SWO/SBW_TDIOJTAG_nTRST/TI_TEST78JTAG_TDIGND910SYS_nRESET

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 19, 2018, 08:42:21 pm
content: Why not.Just one thing that comes to mind is your use of pins 3, 5, 7. In the pin-out description I have, those are connected to GND. Problem with using kind of a "standard" connector is that there's a probability someone would plug a generic debug probe that shorts those pins to GND (I happen to have one for instance) and you'd thus have them shorted on your board, which may be a problem depending on what's connected to those on some of your boards. Just a thought.

author: ataradov
author_rank: Super Contributor
timestamp: November 19, 2018, 10:08:36 pm
content: I use the same connector for all programming interfaces, but I just use a standard pinout for the target whenever possible.

author: technix
author_rank: Super Contributor
timestamp: November 20, 2018, 02:12:48 am
content: Quote from: SiliconWizard on November 19, 2018, 08:42:21 pmOn standard ARM CoreSight connector pins 3 and 5 are GND, and pin 7 is key/NC. Here on my version the debug UART/USB port is grounded but the nTRST is left floating.Quote from: ataradov on November 19, 2018, 10:08:36 pmHmm... This might be a better idea than mine...

author: ataradov
author_rank: Super Contributor
timestamp: November 20, 2018, 02:24:20 am
content: I also made universal 1:1 adapter boards for 10 and 20 pins. Obviously they can be populated with any size connector, since they are 1:1. And gender and positioning (top/bottom) of the connectors can be arbitrary as well.Here is a picture of a real-life use on a current project. One is a standard Cortex Debug header, the other one is a standard Altera JTAG header.
Are there any ARM based NB-IOT SoC? - Page 1
Forum section: electronics / general

author: sangar
author_rank: Regular Contributor
timestamp: November 19, 2018, 05:11:55 am
content: Hi All,I am looking for a NB-IOT SoC chip which should have ARM processor in it instead of others...If anyone came across them, please suggest...Thanks,Muthu

author: errorprone
author_rank: Contributor
timestamp: November 19, 2018, 06:44:00 pm
content: This is the only one I've seen so far. Not released yet though.https://www.nordicsemi.com/eng/Products/Low-Power-Cellular-IoTSent from my LG-H810 using Tapatalk
STM32F4/F7 Quadrature input for interfacing wiht encoder - Page 1
Forum section: electronics / general

author: macck
author_rank: Contributor
timestamp: November 10, 2018, 03:55:37 pm
content: Hello, is it possible to connect encoder with sine/cosine output to the STM via internal comparators which outputs would interface with encoder mode timers? Im talking any common CortexM4/M7 or maybe even H7 family. I found in reference manual:QuoteI was not able to find anything else about that problem.

author: lucazader
author_rank: Regular Contributor
timestamp: November 10, 2018, 10:29:14 pm
content: Im not sure about using the internal comparators.But using external comparators (especially with some decent hysteresis) this works great. super easy to set up and use.

author: cncjerry
author_rank: Unknown
timestamp: November 14, 2018, 07:36:21 am
content: What type of encoder are you referring to? Part number? I recently wrote some interrupt code for an incremental optical encoder that seems to work at low rpm. This is for a dial that a user turns for tuning a radio. I never considered using external comparators for encoders so I'm just curious as to the application. I use Grayhill type optical encoders and recently bought one of those ebay encoders that is actually really nice for like $15, 1/4 the Grayhill. Most of the code I had seen written for the stm chips were step only without direction which is available with quadrature phasing.Jerry

author: r0d3z1
author_rank: Regular Contributor
timestamp: November 14, 2018, 09:53:36 am
content: You have to use the ADC + SW ATAN

author: Smokey
author_rank: Super Contributor
timestamp: November 14, 2018, 10:20:34 am
content: Check out this app note from TI which does a really good job of explaining how to do high res sine/cosine encoder interpolation. Once you get the concept, you can figure out if the STM32 can be configured that way.http://www.ti.com/lit/ug/tidua05a/tidua05a.pdf

author: macck
author_rank: Contributor
timestamp: November 15, 2018, 09:22:53 am
content: Hey,thank you for your replies.Im referring to lika smk magnetic encorders (with 10um resolution). Im not sure yet what they output, but looking at docu, suggests me that these are internally interpolated. That's a shame because we would use 1um resolution.
i.MX1064.... - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 10, 2018, 07:23:10 am
content: Hi,Is NXP on fire? I just have completed the first PCB design of i.MX1050 part, and yet they have released a lot of parts, like this new 1064 and 600 parts, I wonder if 1064 are pin compatible to the 1050, also when we should expect 1GHz partsAlso today I have downloaded segger embedded studio, is it good to work with i.MX parts, since they would let you use their good stuff free for non-commercial use.

author: krho
author_rank: Regular Contributor
timestamp: November 10, 2018, 02:11:03 pm
content: They might be with parts that nobody wants. However the im,x7ULP has been marked as in PREPRODUCTION for the past 18 months. ANd when it will be out it will be "obsolete"

author: ehughes
author_rank: Frequent Contributor
timestamp: November 12, 2018, 07:49:56 pm
content: You haven't seen anything yet :-)

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 13, 2018, 05:46:17 am
content: Quotewhat have you seen?share with us

author: Marco
author_rank: Super Contributor
timestamp: November 13, 2018, 06:41:43 am
content: Quote from: krho on November 10, 2018, 02:11:03 pmIs anyone actually shipping a FD-SOI ARM SOC?

author: brabus
author_rank: Frequent Contributor
timestamp: November 13, 2018, 08:14:41 am
content: One vital advice if you work with Freescale: Check the ERRATA sheet.You may end up writing one yourself. :-D

author: ehughes
author_rank: Frequent Contributor
timestamp: November 14, 2018, 02:11:43 pm
content: QuoteYes.The i.MX8 quad max is FD-SOI as well as the i.MX RT (MCU).I have an MEK with the i.MX7ULP with B0 silicon. It definitely exists. Keep in mind that most of these chips are 1st produced for a large volume customer. This particular chip has gone through an extended test cycle with key customers. It is a nice little chip for the right application.

author: Marco
author_rank: Super Contributor
timestamp: November 14, 2018, 03:54:36 pm
content: Quote from: ehughes on November 14, 2018, 02:11:43 pmOf the MX8 series only the MX8M is in production, the factsheet of the MX8 says FDSOI ... the one for MX8M does not. Same for RT, the only they explicitly say is FDSOI is the RT600, pre-production again.They might have planned more of those lines to be FDSOI long ago, but I think they transitioned as it became clear it wasn't going to work. The 0.9V supply voltage for that MX8M isn't really that low and the one for the RT1050 is min 1.15 ... I doubt that's even 28nm.
ADC gets stuck after doing a HAL_Delay [STM32] - Page 1
Forum section: electronics / general

author: XaviPacheco
author_rank: Regular Contributor
timestamp: November 14, 2018, 01:23:30 pm
content: In the while loop I have this:Code:HAL_ADC_PollForConversion(&hadc1, 1000);adcValue = HAL_ADC_GetValue(&hadc1);The ADC works okay until I execute this line, which is inside a function:Code:HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_SET);HAL_Delay(3000);command_dutyC = 0.5;This delay is used just once in the whole program, i .e, when the delay's completed, it won't execute more.The rest of the program continues working well after the delay, but the ADC gets stuck, it displays the same value all the time, even when the input is changing.This is my ADC init:Code:static void MX_ADC1_Init(void){ADC_ChannelConfTypeDef sConfig;/**Common config*/hadc1.Instance = ADC1;hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV16;hadc1.Init.Resolution = ADC_RESOLUTION_12B;hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;hadc1.Init.EOCSelection = ADC_EOC_SEQ_CONV;hadc1.Init.LowPowerAutoWait = DISABLE;hadc1.Init.ContinuousConvMode = ENABLE;hadc1.Init.NbrOfConversion = 1;hadc1.Init.DiscontinuousConvMode = DISABLE;hadc1.Init.NbrOfDiscConversion = 1;hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;hadc1.Init.DMAContinuousRequests = DISABLE;hadc1.Init.Overrun = ADC_OVR_DATA_PRESERVED;hadc1.Init.OversamplingMode = DISABLE;if (HAL_ADC_Init(&hadc1) != HAL_OK){_Error_Handler(__FILE__, __LINE__);}/**Configure Regular Channel*/sConfig.Channel = ADC_CHANNEL_8;sConfig.Rank = ADC_REGULAR_RANK_1;sConfig.SamplingTime = ADC_SAMPLETIME_247CYCLES_5;sConfig.SingleDiff = ADC_SINGLE_ENDED;sConfig.OffsetNumber = ADC_OFFSET_NONE;sConfig.Offset = 0;if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK){_Error_Handler(__FILE__, __LINE__);}}

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 18, 2018, 04:43:37 am
content: You may find some pointers there:https://electronics.stackexchange.com/questions/202938/stm32-adc-conversion-using-hal
TI Hercules (Cortex-R) MCUs for aerospace and/or radiation imaging - suitability - Page 1
Forum section: electronics / general

author: msimunic
author_rank: Contributor
timestamp: November 14, 2018, 09:00:34 am
content: Hi,I'm kind a searching for MCU arhitecture which is suited for environment with possible small amounts of ionizing radiation, like in a room with CT, or PECT imaging orclose to DUT with Cobalt-60. So, I was looking to buy one of TI's Launchpad boards with Hercules Safety MCU.Brief look on the datasheets - Iv'e noticed that TMS57xxx series applications are (among others) - aerospace and avionics butthey are not intended for radiation therapy and medical imaging.On the other side RM4xxxx, RM5xxxx series are not intended for aerospace and avionics but they are intended for medical imaging and radiation therapy.Looking at the device functionalities, specifications and block diagrams - they are almost the same. At least they look like the same architecture.All of Hercules series TMSxxxxx and RMxxxx are safety mcu, ARM Cortex-R, with ECC on memories and dual core in lock-step.So, I'm wandering what makes device suited for aerospace but not for radiation therapy and vice versa.Anyone can explain, please?

author: capt bullshot
author_rank: Super Contributor
timestamp: November 14, 2018, 09:06:21 am
content: Target marketing and pricing is the main difference, some environmental specifications may be different, such as maximum operating temperature and quality levels. Industrial doesn't want to pay for some of the automotive specs, so they sell the same chip using a different name for the different target markets. Support may also be different, as they might say: We don't support the automotive version for industrial, please buy the industrial version if you want to get supported.The silicon dice are essentially the same, testing and selection might be different.

author: 2N3055
author_rank: Super Contributor
timestamp: November 14, 2018, 10:59:27 am
content: Probably same devices but certified on a different certification path.

author: rsjsouza
author_rank: Super Contributor
timestamp: November 14, 2018, 11:32:07 am
content: In general these devices are characterized and tested each under a specific set of boundary conditions and are tagged according to their performance (many devices with slight different characteristics exist in the same wafer). This tagging also means the manufacturer stands behind the specifications rated on their datasheet, although I haven't yet seen anyone guarantee they can be used in a life support environment (I don't know if your application would be characterized as such).Radiation hardened devices are a bit more involving, as they usually have changes in packaging that may either be physically more immune or expose additional ground or shielding pads/pins of the die.
PIC Programmer using Arduino - Page 1
Forum section: electronics / general

author: epy
author_rank: Regular Contributor
timestamp: November 07, 2018, 02:18:08 am
content: This is Demo to guide how to build PIC Programmer using Arduino Board. We can use any Arduino board to program PIC Controller. This programmer works only on PIC which has Low Voltage Programming.I am using PIC16F1847 pic which has Low Voltage Programming.This project requires only arduino board and PIC which is to be program.https://youtu.be/kpQ2t9pA1HQ

author: epy
author_rank: Regular Contributor
timestamp: November 07, 2018, 04:49:24 am
content: Required Components:Arduino Board With USB to SerialUSB to Serial (if USB to serial is not present on Board)PIC Controller like PIC16F1847BreadboardJumpersLEDResistor - 220 ohmHere is Schematic for the Projecthttps://github.com/embhobbb/a-p-prog/blob/master/rough%20Schematic.png

author: @rt
author_rank: Super Contributor
timestamp: November 08, 2018, 06:57:03 am
content: At last! A proper use for an Arduino

author: epy
author_rank: Regular Contributor
timestamp: November 10, 2018, 06:46:46 am
content: yeah ...But Arduino is involved in almost all things some how. and even to develop the project on other architecture family arduino is required just like above.

author: jaromir
author_rank: Unknown
timestamp: November 16, 2018, 02:09:27 am
content: Hello, author of the programming software here; I'm glad you found it useful. Should you verify it's functionality on other devices, let me know and I'll update the support table, or do pull request.

author: bitseeker
author_rank: Super Contributor
timestamp: November 16, 2018, 05:06:22 am
content: Neat. Thanks for the heads up.

author: epy
author_rank: Regular Contributor
timestamp: November 16, 2018, 03:03:42 pm
content: Quote from: jaromir on November 16, 2018, 02:09:27 amHey Thanks for you study and research. I am happy to talk with you.defenitely i will test for the PIC's which will be available for me and report to you..
Entering sleep modes with wakeup input in known logic state. - Page 1
Forum section: electronics / general

author: Psi
author_rank: Super Contributor
timestamp: November 13, 2018, 08:51:34 pm
content: I'm working on some code on the CC2540 and having trouble finding out how to make sure it can only enter deep sleep power mode (PM3) with an input in a known state.A falling edge on external interrupt pin is used for wake up from sleep, so the cpu must only enter sleep mode when this input is high for everything to work correctly.If i check the pin is high then issue the sleep commands there is a chance it will change low in the time taken to actually enter sleep.Can anyone point me in the direction of some info on how to solve this sort of issue.On CC2540 or just in general.Thanks!

author: Yanayoei
author_rank: Newbie
timestamp: November 14, 2018, 10:36:47 am
content: Hindi sigurado kung paano tutulungan ako? Tungkol sa kaalaman na hinahanap ko, patuloy kong ibinabahagi ang impormasyong ito.
Atmega 162 External SRAM problem - Page 1
Forum section: electronics / general

author: somlioy
author_rank: Regular Contributor
timestamp: November 11, 2018, 06:14:55 pm
content: HelloGot an atmega hooked up to an external 2kB SRAM via parallell lines where data and address lines are multiplexed (shared with an ADC, and OLED display). However I'm having some issues with data inconsistency from the SRAM. The micro is running at 4.9152Mhz.I moved the heap to the external sram with the linker options; (address decoder enables SRAM from 0x1800 to 0x1FFF)Code:-Wl,--defsym=__heap_start=0x801800,--defsym=__heap_end=0x801fff -Wl,--relaxI tried running a sram-test program checking if any writing faults occures and then reading faults. This test completes without any errors at power up. However if I do a reset failures occures. If I power cycles again, no failures occures. This repeats.I'm using the SRAM for a oled-display buffer. Space allocated with calloc;Code:uint8_t *oled_buffer;oled_buffer = calloc(OLED_WIDTH * OLED_HEIGTH/8, sizeof(uint8_t));External SRAM is initated with:Code:void SRAM_init() {// External memoryMCUCR |= (1 << SRE); // External memory enableSFIOR |= (1 << XMM2); // Masking PC7-PC4 for JTAG interface}And as before with the sram-test, the OLED renders perfectly after a power cycle, but after a reset artifacts appear on the display, aswell as missing pixels etc. Artifacts happens during regular re-rendering aswell, only the very first drawing after a power cycle is perfect.Does anyone have any suggestions? Is this noise issues or possible chip issues (chips arent new)?Is it necessary to have a LP-filter on the ALE-line as well as pull down resistor?Address latch:http://www.ti.com/lit/ds/sdas048d/sdas048d.pdfSram:https://ntnu.blackboard.com/bbcswebdav/pid-442669-dt-content-rid-17211924_1/courses/194_TTK4155_1_2018_H_1/SRAM%20CY7C185.pdfAtmega 162:https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2513-8-bit-AVR-Microntroller-ATmega162_Datasheet.pdf

author: iMo
author_rank: Super Contributor
timestamp: November 12, 2018, 06:50:28 pm
content: Is this correct?? Too many nibbles there, imho..Code:__heap_start=0x801800,--defsym=__heap_end=0x801fffIt could be after power up your code for the verifying your external sram will overwrite the address space from 0x0000 to 0x04FF which is reserved for internal memory and upon reset it crashes somehow..

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2018, 11:33:36 pm
content: Missing pixels/bytes suggests timing or signal quality issues.What does your layout look like?Tim

author: somlioy
author_rank: Regular Contributor
timestamp: November 13, 2018, 11:53:41 pm
content: Bypass caps are not shown in the schematic. U1 is the µC, U2 is the latch, U3 is the SRAM, ADC and address decoder on the left. ALE-filter not populated atm.
STM32F4 USB using endpoint address 0x82 - Page 1
Forum section: electronics / general

author: cncjerry
author_rank: Unknown
timestamp: November 12, 2018, 05:51:50 pm
content: I started with cubeMX generated code and have my composite device working one interface at a time (keyboard and encoder). If I put both interfaces on 0x81, neither works for some reason. If I put one on 0x81 and the second on 0x82, the one on 0x81 works. I traced the sendreport to 0x82 and it hangs because it never get "busy" reset. This should happen in the datain stage, which never gets called when 0x82 is used.I realize the CubeMX USB stack is very basic, etc, etc, but before I move to another stack, I wanted to try to get 0x82 working. Maybe having two addresses will help separate the interfaces, i don't know. I allocated a fifo buffer to 0x82 in the init code, open it, and as far as I can tell, it should be working, but that interface never goes into DataIn stage so it always looks busy.Do I need to expand the class with another datain stage? I know the report descriptors are correct and I know my config descriptor is correct. Everything enumerates, etc. I am using two interfaces with two reportIDs and when both are on 0x81, I can watch the traffic go to the PC with wireshark. But it looks like both interfaces somehow get handled by my encoder driver instead of the keyboard driver on one, and the encoder on the other. Looking at device manager, though, it looks like both drivers are assigned correctly to each interface.Does anyone have example code or pointers on how to use 0x82? This is my last attempt with a custom HID using CubeMx. If it doesn't work I am going to do a major rewrite using another USB stack.ThanksJerry

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 15, 2018, 03:07:54 pm
content: You can't have two simultaneously active interfaces using the same endpoint. If one driver receives the data from this endpoint, the data will be consumed and never reach the other driver.
Can SDIO 1-bit mode work on alternate data pins? - Page 1
Forum section: electronics / general

author: a59d1
author_rank: Regular Contributor
timestamp: November 12, 2018, 05:55:18 am
content: Suppose you have an eMMC that has lost its DATA_0 pad, as in the attached image. Would SD 1-bit mode work on any of the other data pins?

author: a59d1
author_rank: Regular Contributor
timestamp: November 12, 2018, 06:12:09 am
content: Anybody know why this is in an eMMC datasheet?QuoteDon't these chips normally work at 1.8V VCCQ?

author: tsman
author_rank: Frequent Contributor
timestamp: November 12, 2018, 02:09:02 pm
content: Quote from: a59d1 on November 12, 2018, 05:55:18 amNo.Quote from: a59d1 on November 12, 2018, 06:12:09 amYour datasheet is phrased badly. It is trying to say that if the eMMC is operating under conditions where VCCQ is 3.3V then you've got a 1 hour limit. It doesn't mean if VCCQ is under 3.3V that you've got a 1 hour limit.

author: mark03
author_rank: Frequent Contributor
timestamp: November 12, 2018, 05:43:57 pm
content: Quote from: tsman on November 12, 2018, 02:09:02 pmIt still doesn't make sense. If the limit were due to dissipated power, equilibrium temperature would be achieved long before one hour. If the limit is due to some other effect, then it ought to be cumulative, meaning if you run at 3.3V for one minute a day, after sixty days your time is up. Neither of these interpretations seem plausible to me. Anyone have insight?

author: tsman
author_rank: Frequent Contributor
timestamp: November 13, 2018, 12:24:15 am
content: Quote from: mark03 on November 12, 2018, 05:43:57 pmThat sentence is from a Sandisk iNAND part. The brochure and datasheet from Sandisk have that warning so its definitely intentional."Device operation under 3.3V VCCQ is limited to Max 1 hour" and "Device operation at 3.3V I/O limited to max 1 hour usage (ex: for use during content/image preloading)"The datasheet changes does note that they made a change to the datasheet to "Add support for VCCQ 3.3" but this was 1 year after the first revision of the datasheet. Maybe they had feedback from big customers who had production line programmers that only worked at 3.3V?Whatever the reason, they don't want you to run these parts at 3.3V normally.

author: a59d1
author_rank: Regular Contributor
timestamp: November 14, 2018, 04:40:57 am
content: Thanks tsman. The data on there wasn't hugely important anyway.
Connections of module bluetooth RN4678 - Page 1
Forum section: electronics / general

author: lorenrus
author_rank: Regular Contributor
timestamp: November 12, 2018, 06:58:50 pm
content: Hi everybodyi'm using this module, i be able to connect with my smartphone but there isn't the bits over the TX pin.My schemartic is in the image.Now i'm not using the PIC uC so for Wake up pin i'm using a button, as explained in datasheet, and for SW BTN a button with two positions.P2_0 --> VccP2_4 --> VccEAN --> GNDthis to use module in normal modeIn the schematic I added the CTS pin put to ground through a 1k resistance.With LEDs D101 e D102 I can stable, through a table in the datasheet, the state, and in my case are in the state "Not connected to peer device".I hope you can help meThank you
[ATmega 0-series] counter woes - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: November 12, 2018, 11:31:07 am
content: So I am trying to read a PWM with TCB0, I have established that the interrupt is firing and the ISR running from the commented out statements that do togle the pin. But my variables always read 0 and the output never goes high. i have established this by changing the code to set a high if the variable is 0 which turns out it is which is in contradiction with the code working from an interrupt point of view.Code:#define F_CPU 3333333UL#include <avr/io.h>#include <avr/interrupt.h>#include <inttypes.h>#include <util/delay.h>uint16_t pulse;uint16_t period;ISR(TCB0_INT_vect){period = TCB0.CNT;pulse = TCB0.CCMP;//PORTA.OUTSET = 0x1 << 2;//PORTA.OUTCLR = 0x1 << 2;TCB0.INTFLAGS = 0x1;}int main(void){// I/O setupPORTA.DIRCLR = 0x1 << 0; // make PA0 INPUTPORTA.DIRSET = 0x1 << 2; // make PA1 OUTPUT// Event sys setupEVSYS.CHANNEL0 = 0x40;EVSYS.USERTCB0 = 0x1;// TCB0 setupTCB0.INTCTRL = 0x1; // turn interrupts onTCB0.EVCTRL = 0x1; // enable eventsTCB0.CTRLB = 0x5; // setup as PWM measureTCB0.CTRLA = 0x1; // enable countersei();// enable global interrupts/* Application code */while (1) {if (period == 0)PORTA.OUTSET = 0x1 << 2;elsePORTA.OUTCLR = 0x1 << 2;}}

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2018, 12:12:36 pm
content: You are missing:Code:volatile uint16_t pulse, period;...int main(void){// I/O setupPORTA.DIR = /* 0 << PIN0 | */ 1 << PIN1; // make PA0 INPUT, PA1 OUTPUT (error: was 2?).../* Application code */while (1) {if (period == 0) {PORTA.OUTSET = 1 << PIN1;} else {PORTA.OUTCLR = 1 << PIN1;}}}When these are assigned,Code:period = TCB0.CNT;pulse = TCB0.CCMP;what values are they? Seems to me the interrupt will be synchronous with the timer so these values will not change very much, in particular period may never be zero so the main() polling loop will never do anything. (I haven't looked at what the timer settings are.)In short, the commented-out statements in the ISR are not the same logic as the uncommented flow. To do that, you'd need to set a flag in the ISR and read it in the loop as, for example:Code:while(1) {if (flag) {flag = 0;PORTA.OUTSET = 1 << PIN1;PORTA.OUTCLR = 1 << PIN1;}}Tim

author: Simon
author_rank: Unknown
timestamp: November 12, 2018, 12:41:11 pm
content: Hi Tim, I had been hacking around with the code which is why I/O pins are not the right numbers. I think it's the lack of volatile that did it, thank you.The counter starts when the input pulse goes high, it sends it's count value to CCMP when the pulse goes low and then stops when the pulse goes high again so that you can read the high pulse from CCMP and total cycle from CNT. Only once the values are read does the counter restart so the interrupt frequency would in effect be half that of the signal.
Read HB100's signal frequency with microcontroller PIC18F46K22 - Page 1
Forum section: electronics / general

author: Fire91
author_rank: Newbie
timestamp: November 11, 2018, 11:27:14 am
content: I'm trying to read the frequency of the signal generated by the HB100 sensor with the PIC18F46K22, the range of frequency is about 10-100 Hz. As shown in the picture, the wiring scheme is composed of an amplifier module made with the OPA2365 opamp with wich I amplify the HB100's signal, the output of this opamp is connected to the RA0 pin of the PIC followed by an internal comparator module, his reference voltage is set via software at 2.048 V (non-inverting pin) and output is pin RA4. The output of the comparator is connected to an input capture module (pin RC1) that reads the period, so I determine the frequency. The frequency counter block of the microcontroller works correctly, in fact, to test it I put in RA0 a sinusoidal 0-5V signal coming from a waveform generator and it reads correctly the frequency. However, when I put the HB100 signal into RA0, the comparator does not detect any signal variation from the inverting pin, ie its output is always low. Why does the circuit work with any signal and with the HB100 signal it does not work? The HB100's signal varies from 0 V to 5 V without problems, but the comparator can't detect when the signal is greater or less than 2.048 V. Can someone help me? Thanks.
Segger Embedded Studio - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 11, 2018, 05:45:16 am
content: Hi,I just have downloaded it, it simply works and it has lots of stuff for free (embos, emIP,emwin,etc...),before you want to make any commercial product, what are your experiences with it? should I stick to keil and let it go, or does it worth the try? cause I see segger has the support for RISC-V parts too, so they might have a better future

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: November 11, 2018, 07:13:53 am
content: Deja vuhttps://www.eevblog.com/forum/microcontrollers/segger-embedded-studio/It's not free for commercial use, if you want to use embOs etc it's €9980 per user. The trend is for manufacturers to bundle a license-free IDE with their chip support, so Segger seem to be bucking the trend.

author: richardman
author_rank: Frequent Contributor
timestamp: November 12, 2018, 02:09:22 am
content: Embedded Studio is Crosswork repackaged, so if you like that...

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 12, 2018, 02:20:46 pm
content: I liked the segger libraries!

author: Harjit
author_rank: Regular Contributor
timestamp: November 13, 2018, 01:32:47 am
content: I've used CrossWorks for years and just finished switching to Embedded Studio. I think it is a well done product.
How is USB OTG different from DRD (Dual Role Device) - Page 1
Forum section: electronics / general

author: rakeshm55
author_rank: Regular Contributor
timestamp: November 09, 2018, 12:03:54 pm
content: How is USB OTG different from DRD (Dual role Device)...I use a processor AM5718 which has no USB OTG functionality but supports Dual Role Device. Does USB standard has recommendations for DRD??. I searched thru USB complete from Jan Axelson. I could not find DRD details.I guess DRD is a subset of OTG with just a hardware feature to switch between Host and Device feature....Where can I find details on USB DRD

author: tsman
author_rank: Frequent Contributor
timestamp: November 09, 2018, 10:13:17 pm
content: Readhttps://www.edn.com/design/consumer/4340182/USB-OTG-software-frees-dual-role-handheld-devicesand it'll explain about dual-role devices.
My STM8 libraries - Page 1
Forum section: electronics / general

author: rhodges
author_rank: Frequent Contributor
timestamp: November 08, 2018, 07:50:56 pm
content: As I mentioned in my introduction post, I am developing libraries for STM8, both for external devices and internals.http://www.hodges.org/rh/stm8/https://github.com/unfrozen/stm8_libshttps://github.com/unfrozen/stm8_testsIn particular, I am targeting the cheap stm8s103 and stm8s105 boards sold on ebay. More information in the Github wiki:Quotehttps://github.com/unfrozen/stm8_libs/wikiAt the moment, I am working on a library for the HC-SR04 ultrasonic distance sensor, one to three devices. And as usual, using the minimum program space possible. And in the background, I am working on a control system for a biodiesel processor.
Perplexed by Charlieplexing - Page 1
Forum section: electronics / general

author: PerranOak
author_rank: Frequent Contributor
timestamp: November 05, 2018, 03:47:08 pm
content: So, I've looked into Charlieplexing (CP) as suggested by a contributor and I love it!I have made simple sets of discrete LEDs light according to the principles of CP but have now hit a snag.I want to use CP for 7-seg displays but with the common anode (or cathode) the individual digits can't be "split-up" to be paired.What do people do?

author: Bassman59
author_rank: Super Contributor
timestamp: November 05, 2018, 09:05:38 pm
content: Quote from: PerranOak on November 05, 2018, 03:47:08 pmDon't do Charlieplexing. Just do regular multiplexing. Use 7 micro/FPGA output pins for the individual segment signals (cathode for common anode displays). Segments 0 on all digits are driven by a common pin. Then the anodes are driven by individual pins, one active at a time.

author: PerranOak
author_rank: Frequent Contributor
timestamp: November 07, 2018, 03:44:33 pm
content: Ah yes but my goal is to operate a four digit, 7-seg display with a microcontroller in an 8-pin package.Don't ask me why, it's just my thang!

author: matseng
author_rank: Frequent Contributor
timestamp: November 07, 2018, 03:56:27 pm
content: We charlieplex the entire display and not the individual digits. It won't give you as good gains as with loose leds at any arbitrary number of displays . But you can drive 8 displays with just 9 pins from the mcu. See myoldancient instructable about the subject athttps://www.instructables.com/id/Charlieplexing-7-segment-displays/

author: PerranOak
author_rank: Frequent Contributor
timestamp: November 07, 2018, 05:15:20 pm
content: Brill, cheers I'll have a look.

author: rstofer
author_rank: Super Contributor
timestamp: November 07, 2018, 06:32:21 pm
content: Quote from: PerranOak on November 07, 2018, 03:44:33 pmSince you can't use reverse polarity as in CP, you are pretty much stuck to at least 7 pins for the segments plus additional pins for digit selection. I don't see parallel connections happening with an 8 pin controller.But you can use a serial driven 7 segment display which just uses 2 pins and the SPI protocol. It would take 3 pins if you decided to control SS'https://www.sparkfun.com/products/11441
Setting up older Lattice isp Programer - Page 1
Forum section: electronics / general

author: TimT
author_rank: Newbie
timestamp: November 14, 2018, 12:04:18 am
content: Hi EveryoneI am in need of some help setting up a Lattice isp parallel port programmer. I am trying to program a older IspLsi1024 chip. I am using a usb to parallel port adapter with the programmer and this setup is not working. ISPvm does not recognize the programmer, I am getting 2 new devices with this plugged in under universal serial bus controllers. usb printing support and no printer attached.I have been " playing around with the drivers " Trying the drivers with ispLeaver but no luck! any help would be appreciated.

author: helius
author_rank: Super Contributor
timestamp: November 14, 2018, 12:59:07 am
content: USB to parallel adapters are intended for printers only, and may have support for some parallel scanners also.In general they do not support other devices.

author: TimT
author_rank: Newbie
timestamp: November 14, 2018, 03:19:15 am
content: Ah yes, Thank you!I should have thought about that. Looks like a PCI Parallel Adapter Card that supports EPP / ECP / SPP might do the trick. Hopefully I am not wrong about that assumption.

author: joeqsmith
author_rank: Super Contributor
timestamp: November 14, 2018, 12:58:58 pm
content: I bought a new PC a couple of years ago that does not have a printer port. I have the same programmer you have and several others.You have PCI which you may have better luck with. I have PCIe slots. I tried a few cards and found one (PN# SD-PEX1005) that even works with DOS.They document how to make a loopback test connector for the board and have some diagnostics you can use to test it.I could not get DOSbox or VirtualBox to work in all cases. This PC has an internal USB port. I just stuck a FLASH drive into it and when I want to run older software, I just boot this drive. Beats keeping an old PC around just to program some older parts now and then.The only problem I ran into (so far) was I have an old programmer that only supported the 378, 278 and 3bc standard addresses. It was simple enough to locate where these were stored in the binary image and change it. You will need to check your Lattice tools to make sure they are not hard coded.Again, PCI may offer a better solution.Good luck.https://www.amazon.com/SD-PEX10005-PCI-Express-Parallel-MCS9900-Chipset/dp/B003D3MFHC
ATmega4809 self triggering pin interrupts - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: November 06, 2018, 12:02:03 pm
content: I am playing with the ATmega4809 development board.I am just trying to see that I can setup an interrupt. So I have an interrupt enabled on PA0 and every time it triggers it pulses PA1 output.But it either triggers on it's own at 89KHz or connecting and disconnecting the waveform generator starts it off.I don't get it, the sig gen is set for 400Hz where is 89KHz coming from?Code:ISR( PORTA_PORT_vect){PORTA.OUTSET = ( 0x1 << 1 );PORTA.OUTCLR = ( 0x1 << 1 );}int main(void){//TCB0TCB0.CTRLB = 0x5; // Set counter mode to input capture frequency and pulse width measurementTCB0.INTCTRL = 0x1; // Enable capture compare interrupt// I/O setupPORTA.DIRCLR = 0x1 << 0; // make PA0 INPUTPORTA.DIRSET = 0x1 << 1; // make PA1 OUTPUTPORTA.DIRSET = 0x1 << 7; // Make PA4 OUTPUTPORTA.PIN0CTRL = (0x1 << 0) | (0x1 << 3); // Setup PA0 with interrupt enabled on both edges and pull up enabledsei(); // Turn global interrupts on.TCB0.CTRLA = 0x1; // Enable the counter (connects the counter to the clock source)/* Application code */while (1){}}I was trying to setup TCB0 to read PWM which is why there is some TCB0 there.

author: ataradov
author_rank: Super Contributor
timestamp: November 06, 2018, 06:12:55 pm
content: You need to clear the flags by writing 1 onto the corresponding bits of the INTFLAGS register. You need to do this in the ISR handler.Quote

author: Simon
author_rank: Unknown
timestamp: November 06, 2018, 06:57:29 pm
content: Ah right, yes I found that out eventually. All working now but I still don't understand ho i was getting that apparent functionality

author: ataradov
author_rank: Super Contributor
timestamp: November 06, 2018, 06:59:29 pm
content: Your interrupt handler was exiting and entering again, since the flag is still set. On a plus side now you know your absolute maximum interrupt rate

author: Simon
author_rank: Unknown
timestamp: November 06, 2018, 07:20:28 pm
content: Oh i see it was leaving the interrupt routine but then found an interrupt condition again. Well yes that is 89.2KHz at 3.3333MHz CPU clock.

author: cv007
author_rank: Frequent Contributor
timestamp: November 06, 2018, 07:39:18 pm
content: Also a nice to know item- after a RETI one instruction is always executed before any pending interrupt. So your original code (without clearing the flag) would return to the main empty loop, then back to the isr.Put pin toggle code in the main loop, leave out the flag clearing in the isr, and you will still see the pin toggle from the main loop. Put a normal delay between the toggle and you will see a major slowdown of the toggle.Which means you can still see the effects of main code running at a snails pace when you forget to clear an irq flag.