hybridfree/eevblog-posts huggingface dataset:
AVR Microcontroller student projects  - Cornell University  -  162 projects - Page 1
Forum section: electronics / general

author: ez24
author_rank: Super Contributor
timestamp: August 24, 2015, 07:39:39 pm
content: FYIThe lab:List of projects:https://www.youtube.com/playlist?list=PLEB09A7C8641987A8I cannot find my favorite project. The student made a sensor that strapped on the leg and would warn the patient when he moved his leg out of bounds from a hip replacement. My dad had a hip replacement and suffered greatly because he could not control the limits of movement. The doctor finally came up with a restraint. The student is now an associate professor at MIT. I think it was from a link to "featured projects".'Any comments on the equipment used?The class now uses PIC32
[MSP430] Programmer via JTAG - Page 1
Forum section: electronics / general

author: ulix
author_rank: Regular Contributor
timestamp: August 25, 2015, 05:53:53 pm
content: Hi,does anyone use a cheap jtag programmer for the msp430 from china? Worth a try?cheers

author: Neganur
author_rank: Unknown
timestamp: August 25, 2015, 07:24:17 pm
content: what cheap msp430 are you talking about? Don't most of the evaluation boards and clones have spy-bi-wire on-board?

author: ulix
author_rank: Regular Contributor
timestamp: August 25, 2015, 07:40:45 pm
content: Hi,was thinking of getting one for backup...http://www.ebay.com/itm/Advanced-MSP430-BSL-USB-programmer-download-Adapter-USB-Port-/200931707417?hash=item2ec8768a19
Lattice MachXO2 JTAG is slow - Page 1
Forum section: electronics / general

author: kalhana
author_rank: Contributor
timestamp: August 22, 2015, 08:15:07 pm
content: I'm using the Lattice MachXO2 Breakout board for some FPGA development.But the issue I'm having is that the onboard FTDI JTAG is very slow.It takes around 50 seconds to load a bitfile to the FPGA.The JTAG on the board is identified in Lattice Diamond as "HW-USBN-2B (FTDI)".I'm thinking of purchasing a "HW-USBN-2B" which costs around £130, but I'm not sure whether the dedicated tool will make loading the bitfile any faster.Has anyone got any experience with using the standalone HW-USBN-2B?If so, is it any faster than the onboard FTDI based JTAG?Thanks!

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 22, 2015, 08:46:06 pm
content: Are you programming flash or RAM? For flash that sounds about right. For RAM it should be about 10 secs I think.During development you should be using RAM download as it's much much faster, and only use flash when you need it to come on at powerup.Also, I don't know if it's still the case, but last time I checked, the programmer software in Diamond was a lot slower than Lattice's standalone ISPVM software.

author: kalhana
author_rank: Contributor
timestamp: August 22, 2015, 11:37:45 pm
content: Thanks for the help Mike.Yes, I was using the flash rather than the RAM. Now it's much faster.
XMEGA QDEC - Page 1
Forum section: electronics / general

author: maurosmartins
author_rank: Regular Contributor
timestamp: August 27, 2015, 08:49:58 pm
content: Hello all,on my current project I need to use the quadrature decoder (QDEC) present in the XMEGA microcontrollers.searching the web, I've found the application note AVR1600 and respective software, with that I've tried to initialize the module as follows:Code:QDEC_Total_Setup(&PORTB, /*PORT_t * qPort*/6, /*uint8_t qPin*/false, /*bool invIO*/0, /*uint8_t qEvMux*/EVSYS_CHMUX_PORTB_PIN6_gc, /*EVSYS_CHMUX_t qPinInput*/false, /*bool useIndex*/EVSYS_QDIRM_00_gc, /*EVSYS_QDIRM_t qIndexState*/&TCC0, /*TC0_t * qTimer*/TC_EVSEL_CH0_gc, /*TC_EVSEL_t qEventChannel*/0);/*uint8_t lineCount*/and then read from the counter as follows:Code:while(1){PORTA.OUTTGL=PIN0_bm;delay_ms(500);printf("Counts %u\r",TCC0.CNT);}unfortunately the count numbers is always 0.I've tried to initialize the registers manually like this :Code:PORTB.DIRCLR = (PIN6_bm | PIN7_bm);PORTB.PIN6CTRL = PORT_ISC_LEVEL_gc;PORTB.PIN7CTRL = PORT_ISC_LEVEL_gc;EVSYS.CH0MUX = EVSYS_CHMUX_PORTB_PIN6_gc;EVSYS.CH0CTRL = EVSYS_QDIRM_11_gc | EVSYS_QDEN_bm | EVSYS_DIGFILT_1SAMPLE_gc;TCC0.CTRLD = (TC_EVSEL_CH0_gc | TC_EVACT_QDEC_gc);TCC0.PER = 7;TCC0.CTRLA = TC_CLKSEL_DIV1_gc;with the same results.I'm using PB6 e PB7 on a atxmega128a3u at 32MHz. the encoder signals are ok as can be seen here:any help would be appreciated!Thanks in advanced,Best regards, Mauro.

author: Dago
author_rank: Frequent Contributor
timestamp: August 28, 2015, 11:41:31 am
content: Here is a macro I've used on XMegas to setup quadrature decoding:Code:// Macro to setup quadrature decoding by doing following:// (1) Set pin direction for QDPH0 and QDPH90 as input and enable level sensing// (2) Select QDPH0 pin as multiplexer input and enable quadrature decoding and digital filtering// (3) Set quadrature decoding as event action and select Quadtrature event channel as event source#define SETUP_QUADRATURE( x, ch )\x##_PORT.DIRCLR = x##_QDPH0_bm | x##_QDPH90_bm;\x##_PORT.x##_QDPH0_CTRL = PORT_ISC_LEVEL_gc;\x##_PORT.x##_QDPH90_CTRL = PORT_ISC_LEVEL_gc;\EVSYS.CH##ch##MUX = x##_EVSYS_MUX;\EVSYS.CH##ch##CTRL = EVSYS_QDEN_bm | 1;\x##_COUNTER.CTRLD = TC_EVACT_QDEC_gc | TC_EVSEL_CH##ch##_gc;\x##_COUNTER.PER = 0xFFFF;\x##_COUNTER.CTRLA = TC_CLKSEL_DIV1_gc
A tiny STM32F103 issue, GPIO trigged DMA transfer rate! - Page 1
Forum section: electronics / general

author: MT
author_rank: Super Contributor
timestamp: August 20, 2015, 09:23:44 pm
content: In a asynchronous GPIO/CC capture triggered DMA transfer (Flash/RAM to PWM1, circular, 256 bytes, one byte a time)what kind of maximum (inc clock synchronisations and extra garbage and CPU on idle) DMA transfer speed could i expect?I had estimated for a 72Mhz F103 GPIO triggered abut 4,5M cycles but when i tested i got only 1,5M cyclesthen it seams DMA start to miss requests erratically, however when i do the same procedure with a Timertriggering via CC match or update event i can easily do 8M cycles.Can there be something in the input clock net chain that might cause this to slow down? Well, ST dontprovide any info on gate level! (no i'm not talking about the input filter( counters) or other pre scalers).

author: MT
author_rank: Super Contributor
timestamp: August 21, 2015, 08:38:40 pm
content: Solved!..... Well, more or less!

author: westfw
author_rank: Super Contributor
timestamp: August 22, 2015, 12:19:29 am
content: How?

author: MT
author_rank: Super Contributor
timestamp: August 22, 2015, 02:37:07 pm
content: By scratching my flea infested beard for hours until realizing there is something spokey going on in the input filter after all and then found out that TIM_CCMR1_IC1F's is not zero out of reset as acclaimed by RM0008 rather set to div 4 ratio! So a write of 0 to all IC1F bits at init time cured the mad cow. But i also found that TIM_CCMR1_IC1PSC only divratio that works is 0 and 8, most likely a hardware bug as well. Apparently the I2C silicon is garbage to so these 10 chips is going straight into the dumpster in couple of days no point in wrestling with old silicon! So until new silicon arrives, the DMA runs like crazy and try to complete all requests one throws at it, so i slowly bringing up more and more tasks for the CPU to complete and well see when the arbiter starts to choke it. The F2 series have lot better DMA design apparently. My application needs 3 independent and entirely asynchronous (is outside) 4,5M cycle(at least, probably more) transactions that's GPIO triggered , i probably have to switch to a faster F4 chip.
Latest stm32f10x.h - Page 1
Forum section: electronics / general

author: MT
author_rank: Super Contributor
timestamp: August 19, 2015, 12:32:08 am
content: Do anyone know if there is a newer stm32f10x.h file then March 2012 and if so where could i find it?

author: westfw
author_rank: Super Contributor
timestamp: August 20, 2015, 07:57:13 am
content: Yes, sort of. If you download the STM "Cube" package for the F1, you'll find that stm32f10x.h has been replaced by stm32f1xx.h and/or individual (per-chip) stm32f102xb.h (and etc) files. The latest is from 2015 (STM Cube v1.2), although comparing it to the initial F1 Cube release (1.0, in 2014) it seems to show that nothing has changed other than version numbers and copyright notices.I'm glad; I really disliked the the older version's "tell us whether you're a low-end, midrange, or enhanced-midrange chip" rather than just being able to give it a chip number. OTOH, the new way makes the source more bloated.http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897/PF260820#(and: the cube download is easier to find on the website than the "Standard peripheral library" used to be. Yeah for progress!)

author: MT
author_rank: Super Contributor
timestamp: August 20, 2015, 05:31:40 pm
content: Thank you very much for the info westfw!I dont like the old way nor the new way, i do direct register programming so....i have an argument with ST every day!

author: westfw
author_rank: Super Contributor
timestamp: August 21, 2015, 01:47:06 am
content: QuoteI didn't mean that I thought CUBE was better than SPL; just that I prefer having separate per-device CMSIS .h files instead of a common file with a bunch of conditionals...

author: Bassman59
author_rank: Super Contributor
timestamp: August 21, 2015, 10:12:18 pm
content: Quote from: westfw on August 21, 2015, 01:47:06 amYou mean you don't love the Atmel Software Framework??

author: ataradov
author_rank: Super Contributor
timestamp: August 21, 2015, 10:47:38 pm
content: What's up with all the chip vendors making us extract the headers from heaps of garbage code? And you are in luck if it does not come as an *.exe installer.
Synopsys Synplify - a chance to play with it for free? - Page 1
Forum section: electronics / general

author: daqq
author_rank: Super Contributor
timestamp: August 18, 2015, 08:29:14 pm
content: Hi guys,A Chinese company called Gowin is offering the Synplify package for their FPGAs:http://www.prnewswire.com/news-releases/synopsys-and-gowin-semiconductor-ink-multi-year-oem-agreement-for-fpga-design-software-684059495.htmlThe download is here:http://www.gowinsemi.com.cn/en/dowenshow.aspx?n_id=147You have to license it from them (http://www.gowinsemi.com.cn/en/sheng.aspx), but I guess its OK if you wanna play with a leading edge software package for free.I'll look into it some time in the future, right now I've got enough headachesEnjoy,David

author: marshallh
author_rank: Unknown
timestamp: August 19, 2015, 03:10:27 am
content: You can use it with Lattice stuff. (Diamond) Standalone program.

author: Bassman59
author_rank: Super Contributor
timestamp: August 19, 2015, 06:54:46 pm
content: Quote from: marshallh on August 19, 2015, 03:10:27 amAnd Microsemi (Actel).

author: Avien
author_rank: Contributor
timestamp: August 19, 2015, 07:02:01 pm
content: Anyone knows if this license work with Lattice or Microsemi version (they are different if you didn't know)?Avi

author: Bassman59
author_rank: Super Contributor
timestamp: August 20, 2015, 04:22:13 pm
content: Quote from: Avien on August 19, 2015, 07:02:01 pmAccording to TFA, the version of Synplify under this agreement will target only the Gowin FPGAs. That is the same agreement that Lattice and Microsemi have with Synopsys -- you get the tool for free but it only synthesizes designs for the respective company's devices.Obviously Gowin isn't big enough to have enough resources to provide a home-grown synthesis tool, so paying Synopsys to do it for them makes a lot of sense.Based on the fact that Gowin does not have an English-language web site, my guess is that we won't see them get much traction outside of China.

author: unitedatoms
author_rank: Frequent Contributor
timestamp: August 21, 2015, 11:04:26 pm
content: I used Synplify included into Libero IDE by Atmel with 6-12 months trial.Edit: Yes, I meant to say Actel. Thank you Bassman59

author: Bassman59
author_rank: Super Contributor
timestamp: August 23, 2015, 06:43:35 pm
content: Quote from: unitedatoms on August 21, 2015, 11:04:26 pmLibero is Actel's (now Microsemi) FPGA toolset, not Atmel's. (Atmel does have one obsolete FPGA family in their catalog.) And the version of Synplify that ships with it targets only Microsemi devices. If you want use it with Xilinx or Altera FPGAs, you will have to send Synopsys a very large check.And for most of Microsemi's devices, the free license is easily renewed when it expires.
Konig Wireless Weather station (KN-WS400N) - DECODED! - Page 1
Forum section: electronics / general

author: TJ232
author_rank: Frequent Contributor
timestamp: August 20, 2015, 03:18:12 pm
content: Looking a bit deeper to aKonig 433Mhz Wireless station with hygro-thermometer (KN-WS400N)had a lot of fun decoding the communication protocol.Full Article, for reference:http://www.esp8266-projects.com/2015/08/mailbag-esp8266-weather-station-433mhz.htmlAfter that, using somecheap 433Mhz radio modulesand aESP8266 CBDB Dev Boardequipped with aDHT22 temperature/humidity sensormanaged to directly upload data wireless to the Konig wireless station:https://www.youtube.com/embed/Ea2R4OZ-F3U
Node.js for embedded system - Page 1
Forum section: electronics / general

author: farsi
author_rank: Regular Contributor
timestamp: August 18, 2015, 08:30:11 am
content: Hi,I am writing a book about working with Node.js for embedded devices, such as Arduino, Raspberry Pi and the Intel boards.The book is primarily targeted at web folks or non-embedded experts.To get a feeling where I am at in the book writing, it would be nice to get in touch with possible proof readers, or general feedback.Who is working with Node.js and embedded devices here?Thanks!

author: amyk
author_rank: Super Contributor
timestamp: August 18, 2015, 08:50:46 am
content: Are you kidding? JavaScript in embedded systems? I guess you have to waste that CPU and memory somehow...

author: farsi
author_rank: Regular Contributor
timestamp: August 18, 2015, 08:54:39 am
content: Yeps, some boards ask for that. But there are other options too, like having the MCU run with normal C/C++ and interface the device from outside with Node.js.For example, I do something like this to broadcast the temperature of my living room with MQTT to the interwebs. Then, an user interface in the web browser could do something with it. Another example of "outside" usage of Node.js is this small 7 segment display editor:http://disp7s.divshot.io/

author: andersm
author_rank: Super Contributor
timestamp: August 18, 2015, 09:13:39 am
content: Derek Molloy'sExploring Beagleboneuses Node.js for some examples. It expands the availability of embedded systems.

author: farsi
author_rank: Regular Contributor
timestamp: August 18, 2015, 09:45:55 am
content: Thanks, indeed this series looks great, e.g.- maybe I should try to get in touch with other academic folks

author: samofab
author_rank: Regular Contributor
timestamp: August 18, 2015, 08:05:00 pm
content: Not all embedded development is time critical so Javascript on embedded devices might have its niche. There are a few examples of using Javascript on embedded devices (espruino), but I farsi is likely talking about devices cable of running linux.With processor fast enough you can probably bitbang a lot of different protocols even from Node.js.If you don't do bad things (blocking libuv loop), node.js is very fast.If anybody is interested.. I'm in the final phases of writing a Node.js bindings for VISA (by final phase I mean a first example of barely usable code). It gives you a special kind of satisfaction to talk to 25 years old instruments from Node.js.

author: farsi
author_rank: Regular Contributor
timestamp: August 18, 2015, 08:51:35 pm
content: nice!that would indeed be great to control measurement devices with streams, callbacks and the likei was looking earlier on npm for visa drivers, but could not find any. my first examples to try would be letting a multimeter and supply talk to each other.PS thanks for the nice expression "the other end of the cable setup"
Microcontroller, TFT and ? on breadboard question  - Page 1
Forum section: electronics / general

author: ez24
author_rank: Super Contributor
timestamp: August 17, 2015, 12:07:58 am
content: HiHere is a picture of a breadboard, unfortunately we cannot see the right side to see if a USB cable is connected to the Microstick II: (click on the picture for a close up)http://people.ece.cornell.edu/land/courses/ece4760/PIC32/index_TFT_display.htmlThe module on the right is a PIC32 on a Microstick IIhttp://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=DM330013-2The module in the center is a TFT from Adafruithttp://www.adafruit.com/product/1480The module on the left ishttps://www.sparkfun.com/products/retired/198Notice it is retired (and the is for a 2015 class)Well anyway from the picture I cannot understand how the Sparkfun board is hooked up. I do not see the TXO or the RXI pins being used. Is this board being only used as a source of 3.3 v for the TFT?TIA

author: Chris C
author_rank: Frequent Contributor
timestamp: August 17, 2015, 12:37:41 am
content: Quote from: ez24 on August 17, 2015, 12:07:58 amIt appears that way. I couldn't figure out why they'd do this, until I saw the breadboard damage right above the Microstick II. And that's just what I can see, there's no telling what hell this breadboard has been through in an academic environment. So I'm guessing the 3.3V from the Microstick comes out of the header to damaged breadboard contacts, and is therefore unusable.

author: neslekkim
author_rank: Super Contributor
timestamp: August 17, 2015, 07:01:07 am
content: Quote from: ez24 on August 17, 2015, 12:07:58 amOnly for power, why not?Look at the bottom pictures, there the microstick is providing power instead.

author: ez24
author_rank: Super Contributor
timestamp: August 17, 2015, 08:02:33 pm
content: Found this sentenceQuoteSo the left module was only for power because the Microstick II has Vdd, but to use it, a header has to be soldered in. He tells the students to solder in a 2 pin header to get to Vdd. In the picture there is no header. Seems a goof by Microchip.

author: neslekkim
author_rank: Super Contributor
timestamp: August 17, 2015, 08:05:15 pm
content: Why is that a goof?, if you don't need it, it's no point in having an header that is easy to short out..The holes are there, easy to solder on.
Atmel AT91SAM3X8E  vs   PIC32MX250F128B      report - Page 1
Forum section: electronics / general

author: ez24
author_rank: Super Contributor
timestamp: August 17, 2015, 11:12:03 pm
content: I figure if I read this 50 times I might be able to understand it allhttp://people.ece.cornell.edu/land/courses/eceprojectsland/STUDENTPROJ/2013to2014/sm893/Independent%20Study%20Paper%20Final.pdf

author: westfw
author_rank: Super Contributor
timestamp: August 19, 2015, 12:16:25 am
content: Hmm. There might be some disadvantages to referring to college class papers as technical references. Especially pre-grading. The biggest "problem" is that most students are disinclined to go back and fix up their papers/etc as they learn more...Aside from the "I don't think I ever got the PIC32 setup working right", the most glaring problem with the material itsel was talking about the PIC32 "Core timer" without ever noticing the similar "SysTick Timer" on the SAM3X. (on ARM chips, the Systick timer is considered part of the ARM core, rather than a vendor peripheral.)
145c atmega328p Pro Minis - Page 1
Forum section: electronics / general

author: ralphd
author_rank: Frequent Contributor
timestamp: August 16, 2015, 01:44:25 pm
content: I love how Shenzhen manages to make electronics cheaper and cheaper. This weekend I found "straight input" (no regulator) Pro Minis going for 145c:http://www.digikey.com/product-search/en?keywords=atmega328p-puI think I've only used the on-board regulator once, and that was just to test if it worked with 12V in. The rest of the time I power them from 5V or 3.5V.From looking at the board it seems they didn't bother with a .1uF decoupling cap between Vcc and Gnd. The pads for the regulator pins look like they're 0.1" spacing, which I find works great for 0805 parts. In other words just solder a surface-mount .1uF cap between the Vcc and Gnd pads.For comparison, I checked the price of a 328P-PU at Digi-key: 370c. So for the price of 2 328P-PUs, you can get 5 Pro Minis.I've noticed Mouser is starting to show stock on the ATmega168PBs, so once they make it in volume to the China market I think we will see 99c Pro Minis. Maybe by Christmas?
STM32F105VB Interrupts - Page 1
Forum section: electronics / general

author: mcdesca
author_rank: Contributor
timestamp: August 16, 2015, 08:35:14 am
content: Dear everybody,I am currently programing this mcu to react to external interrupts.There is a button at PORTA9 and a software-driven LED at PORTB12.When I press the button (with pull-down resistor and debouncing cap), the mcu freezes (if I switch on and off an LED inside the while(1) loop, it will freeze) and no output led is activated.What do you think? What steps do you recommend me to follow for its debug?Many thanks.Code snippet:Code:void EXTI_5_9_Handler(void) {EXTI_ClearITPendingBit(EXTI_Line9);GPIO_SetBits(GPIOB , GPIO_Pin_12);}main() {RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOB , ENABLE);RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOE , ENABLE);RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_Init(GPIOB, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;GPIO_Init(GPIOA, &GPIO_InitStructure);EXTI_ClearITPendingBit(EXTI_Line9);//Connect EXTI Line to Button PinGPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource9);//Configure Button EXTI lineEXTI_InitStructure.EXTI_Line = EXTI_Line9;//select interrupt modeEXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;//generate interrupt on rising edgeEXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;//enable EXTI lineEXTI_InitStructure.EXTI_LineCmd = ENABLE;//send values to registersEXTI_Init(&EXTI_InitStructure);//configure NVIC//select NVIC channel to configureNVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn;//set priority to lowestNVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;//set subpriority to lowestNVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;//enable IRQ channelNVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;//update NVIC registersNVIC_Init(&NVIC_InitStructure);while(1) {}}

author: andersm
author_rank: Super Contributor
timestamp: August 16, 2015, 08:52:13 am
content: You're clearing the wrong pending bit inside the ISR.

author: mcdesca
author_rank: Contributor
timestamp: August 16, 2015, 09:06:38 am
content: Corrected, that was wrong from the copy paste, I've tried on another input pin before. It should turn on the LED anyway, but no.My guess is that the NVIC is looking for the handler in a wrong address...

author: mcdesca
author_rank: Contributor
timestamp: August 16, 2015, 11:05:19 am
content: Ok, excuse me, after looking at the .map file, it was the name of the handler, should be -> void EXTI9_5_IRQHandler(void)Best,
svdregview - Point-and click access to MCU peripheral registers - Page 1
Forum section: electronics / general

author: Lukas
author_rank: Frequent Contributor
timestamp: August 17, 2015, 09:19:16 am
content: Hi everyone,maybe some of you Makefile/gcc users have been envying KEIL users for the Keil System Viewer, which allows you to peek&poke peripheral registers in a nice way. Envy no more!https://github.com/carrotIndustries/svdregviewgives you point and click access to any ARM MCU's registers that you manage to obtain a SVD file for. Currently only works on linux.Hopefully someone can make use of this.

author: Brutte
author_rank: Frequent Contributor
timestamp: August 17, 2015, 09:33:22 am
content: Quote from: Lukas on August 17, 2015, 09:19:16 amWhat about embsysregview? What about GNU Arm? These both are plug-ins for Eclipse.

author: SolarSunrise
author_rank: Regular Contributor
timestamp: August 17, 2015, 09:56:25 am
content: Damn thanks man. I will definitely keep this in my arsenal for future debugging.Quote from: Brutte on August 17, 2015, 09:33:22 amWell for those of us who don't use eclipse (I use Sublime Text) this kind of program can save a heck of a lot of headache.

author: Brutte
author_rank: Frequent Contributor
timestamp: August 17, 2015, 10:48:48 am
content: Quote from: SolarSunrise on August 17, 2015, 09:56:25 amWhat is the point of using a (SublimeText) source code editor that does not have MI gdb interface and do debugging with register point and click?
STM32F10X USB - Page 1
Forum section: electronics / general

author: Junkers
author_rank: Contributor
timestamp: August 16, 2015, 08:16:48 am
content: I'm attempting to get the VCP loopback example (stm32121) provided by STM (see doc UM0424) going for the sake of a project I'm currently working on. However the example seems to be setup for an evaluation board which I'm not currently using. Instead, I'm using the same chipset (stm32f103) but on a different dev board. I'm having trouble configuring the hardware as I don't know what is really required and was hoping someone could help me. I notice there are a lot of flag options in hw_config.c for different chipsets but none for my specified chipset, yet the platform_config.c does account for my chipset (STM32F10X_MD).From lines 114 - 137 in hw_config.c I've commented out lines and made amendments to account for the differing libraries, the one I'm currently using being STM32F10x_StdPeriph_Lib_V3.5.0. I haven't included any flags as I'm attempting to hard code what is necessary. Can anyone please look over hw_config.c and verify if what I have there is correct?https://github.com/leyjere/usb/blob/master/hw_config.cThanks
Strange interrupt with Galileo Gen 1 during firmware upgarde - Page 1
Forum section: electronics / general

author: farsi
author_rank: Regular Contributor
timestamp: August 14, 2015, 05:13:55 pm
content: Hey there,I am trying to update the firmware of an Galileo Gen 1 from 742 to 1.0.4 with the firmware upgrade tool.Watching what happens on the serial port shows something strange>6 BPS:[ 134.14978omm: clloade 3.8.7-yoc150096] Cal6] [<c107edrt_bad_irq+096] [<e077e_udc_isr+0x15d/0x1028 [40>] note_i60/0x1a055/0x130 [<c107d6ercpu+0x70/34.150096] irq_event+0x 134.150096irq_event+06] [<c107f2q+0x70/0x70e8bf1>] ? co6 ? do_IRQace_hardirq0x9a/0x170[ 134.r_del+0xb/0xc1035ed5>] rq+0x55/0x130[ 134.150096] [<c134.150096] <IRQ> [<c10360f5>] ? irq_exit+0RQ+0x43/0xb050096] [<c1trace_hardirqs_on_calle50096] [<c1x36[ 134>] pch_udc_i][ 134.1bling IRQ #40Byte 9] irq 40: nobody cared (try booting with the "irqpoll" option)[ 134.150096] Pid: 875, cr Tainted: G W to-standard #1[ 134.l Trace:[ 134.1500974>] __repox24/0xc0[ 134.15004ad>] ? pchpch_udc]What does this mean?How could I stop that interrupt popping up during my firmware upgrade?Thanks a lot in case someone has an idea what is wrong.

author: farsi
author_rank: Regular Contributor
timestamp: August 15, 2015, 03:11:57 pm
content: Not sure why this interrupt occurs when doing the upgrade from my Linux machine.From the Mac everything worked. I discovered how to upload files with clloader and the zterminal protocol as a by product:https://github.com/01org/clloader
testing of board using linux - Page 1
Forum section: electronics / general

author: zze110
author_rank: Contributor
timestamp: August 13, 2015, 03:33:35 am
content: Hello again,Wondering if anybody has ideas how to accomplish this:I want to find an automated way to test a board using the onboard uBoot or linux. Is there any sort of generic software or method I could use to upload a program to the board over rs232/serial then execute it. Example of tests: I2C bus, DDR test, etc.I have a product almost identical to the Ti DM6446 DVEM demo board that I would like to test. It is running denx uBoot and loads a Montavista linux pro 3.0 image to ram and runs it. I have root access.The thing I notice about MontaVista is their busybox # has an extremely limited command set far less than normal linux. So, I'm assuming the ability to do this wouldn't be built-in to the OS.If I had to build it myself I'm guessing I would have to write the test then compile it for the dm6446/montavista and go from there. Ideas? thanks!On a separate note... this same board I have tried rewriting the NAND using an XDS jtag emulator and no matter what I try I am unable to halt the processor. Would this indicate a hardware problem on the jtag connection? jtag emulator fails, serial flasher (dvflasher & newer version) also fails, unable to halt cpu.
how energy efficient are Nucleo boards? - Page 1
Forum section: electronics / general

author: electronicsfun
author_rank: Newbie
timestamp: August 11, 2015, 12:43:35 am
content: Hello,I'm a newbie to real microcontrollers. I know the Arduino Uno wastes a lot of power if you use it as is. To be energy efficient, you have to build your own, kind of, and throw away the USB-TTL converter, use a better voltage regulator, leave out the board LED's.What about the Nucleo boards? The STLink portion can be cut away, but what about the rest of the board? Is the rest of the board pretty energy efficient? According to the documentation, you have to provide your own 3.3V circuit, which makes me think they're giving you the latitude to have a pretty energy efficient board for your projects.

author: neslekkim
author_rank: Super Contributor
timestamp: August 11, 2015, 09:00:14 am
content: you CAN use 3v3 if you are powered from something else, but you can use E5V or VIN to provide power also, page 17-18 in the manual.
Low-power 433MHz OOK RX detection - Page 1
Forum section: electronics / general

author: brainwash
author_rank: Frequent Contributor
timestamp: August 10, 2015, 05:18:34 pm
content: One of my friends is trying to build a battery powered 433Mhz base station that receives weather sensor data. These sensors (emittors) use OOK (or is it ASK?) to send data at random intervals. Is there any way do continuosly detect a signal while keeping a low power profile?I have a weather station at home that runs on 2 AAA batteries which last for months/years. How do those guys do it? There's only a blob and the receiver is analog, same as the cheap 1$ ones from eBay. It's able to catch most of the transmitter messages.

author: Marco
author_rank: Super Contributor
timestamp: August 11, 2015, 01:14:08 am
content: The ultra low power wake up receivers generally uses a SAW filter followed by a diode multiplier/detector without RF amplification, the amplification in the follow up comparator is at LF so can be done at very low power. Selectivity is obviously not great.Here'san example of a commercial module (a rather expensive one).The super-regenerative receivers can get low as well, but I can't find any uW commercial modules.

author: brainwash
author_rank: Frequent Contributor
timestamp: August 11, 2015, 06:07:47 am
content: Then I asume the cheap weather stations periodically wake up at just the right time to RX. I'm almost certain they use super regen. Plus, they cost around 10usd including one transmitter.Guess I will have to probe or log the RX supply voltage and current consumption in one of these units.
Building an SD Card for Galileo - Page 1
Forum section: electronics / general

author: farsi
author_rank: Regular Contributor
timestamp: August 09, 2015, 08:29:00 am
content: Hi,I am stuck with building an SD Card with Python and Node.js for the Intel Galileo. What I do with MacOS is:1) Format 16GB SD Card in FAT32 format2) Download an image, such as Debian (http://sourceforge.net/projects/galileodebian/files/latest/download), this image iot-devkit-1.5-i586-galileo and this image LINUX_IMAGE_FOR_SD_Intel_Galileo_v1.0.23) Copy one of the images onto the SD card with dd if=... of=/dev/disk1s14) BootThis always ends up that the SD card is not recognized properly, and the image is booted from the SPI Flash.What can I try to debug this problem?--- Output after boot attempt:??? Please select boot device: ????Boot Device List ??UEFI Misc Device ??UEFI Payload ??UEFI Internal Shell ???? and to move selection ?? ENTER to select boot device ?? ESC to exit ???EFI Shell version 2.31 [1.0]Current running mode 1.1.2Device mapping tableblk0 :BlockDevice - Alias (null)PciRoot(0x0)/Pci(0x14,0x0)Press ESC in 1 seconds to skip startup.nsh, any other key to continue.Shell> lsls/dir: Cannot open current directory - No Mapping

author: eyal
author_rank: Contributor
timestamp: August 09, 2015, 12:48:53 pm
content: Quote from: farsi on August 09, 2015, 08:29:00 amI do not know MacOS, but you need to copy the image to the SD, not to the first partition (is this what disk1s1 mean?). There is no need to partition or format the SD beforehand.cheers

author: farsi
author_rank: Regular Contributor
timestamp: August 10, 2015, 05:53:09 pm
content: thanks, indeed now it worked with this command:$ sudo dd if=iot-devkit-latest-mmcblkp0.direct of=/dev/disk1 bs=4mno formatting or partition assignment necessary
A cortex M3 for makers - Page 1
Forum section: electronics / general

author: electronicsfun
author_rank: Newbie
timestamp: August 10, 2015, 05:33:38 am
content: Hello,I'm looking to start using Cortex M3's on the mbed platform. I'm looking for recommendations based on a few things:1) Must have mbed support.2) Must sell in nice form factors.By nice form factors, I mean the microcontroller is available in a small package with a good selection of pins and maybe the power electronics for battery power usage. I started looking at the STM32 line, because they have good mbed support and the dev boards are cheap. But, I couldn't really find anything smaller than the dev boards if I just need a couple to make a prototype battery powered device. I'm pretty much stuck with using the dev board unless I actually go about getting a custom PCB, and make the board.That's not really something I want to get into. I only need 3 or 4 for my project.

author: tszaboo
author_rank: Super Contributor
timestamp: August 10, 2015, 06:17:54 am
content: Buy the original mbed, the board before it became a bloatware. mbed NXP LPC1768 it is called I believe.

author: zapta
author_rank: Super Contributor
timestamp: August 10, 2015, 06:28:53 am
content: Have you looked here?https://developer.mbed.org/platforms/For examplehttps://developer.mbed.org/platforms/mbed-LPC1768/

author: Ultron
author_rank: Contributor
timestamp: August 10, 2015, 10:39:19 am
content: Original NPX MBED is very expensive (about 70$)I suggeste the NUCLEO-F411RE, by ST. You can get it for less than $ 20.Besides it has also a onboard ST-Link debugger/programmer, that can be detached and used to program other MCU.This one is compliant with Arduino Shield form.

author: ralphd
author_rank: Frequent Contributor
timestamp: August 10, 2015, 11:12:57 am
content: I don't think you'll find anything cheaper than the $4 maple mini clones.http://www.aliexpress.com/item/leaflabs-Leaf-maple-mini-ARM-STM32-compatibility/32214664071.html

author: zapta
author_rank: Super Contributor
timestamp: August 10, 2015, 04:22:16 pm
content: When you pick a MCU, you want at the same time to consider what tools are available for it. Some come with better and easier to setup free tools than others.

author: jnz
author_rank: Frequent Contributor
timestamp: August 10, 2015, 04:49:06 pm
content: I have a few Nucleos, they're fairly nice. If you don't want to use the STLink as a full-on programmer, it has a mass storage option.I'd recommend.

author: Spikee
author_rank: Frequent Contributor
timestamp: August 10, 2015, 05:19:38 pm
content: I have used the mbed f411RE dev board before and it is great.It also works with keil etc. Mbed OS is not that bad either.Me and other team members had some problems installing the full stlink drivers so that the usb uart stuff also works (stock driver does not do this). After some trial and error I got it working. The good driver is somewhere on the mbed site.

author: ElektroQuark
author_rank: Unknown
timestamp: August 10, 2015, 05:23:21 pm
content: Take a look at the Mbed "enabled" Freescale Freedom boards here:https://developer.mbed.org/platforms/?pvend=4Only M0 and M4 thougth.
xMega power consupmtion - Page 1
Forum section: electronics / general

author: Aleksandar B.
author_rank: Contributor
timestamp: August 06, 2015, 06:33:51 pm
content: I have a project where one of the requirements is for the device to be battery powered. The electronics design is done by someone else and the microcontroller that was chosen is Atmel's xMega128A1. So after writing some firmware the least amount of current that I managed to get is 619uA at 1.8V (In sleep mode). I have no previous experience with battery powered devices but this sounds like a lot to me. Also the datasheet says that the power consumption in those conditions should be 0.52uA... I know some manufacturers like to over exaggerate but the difference here is ~1240x. I have done everything that Atmel suggests through application notes and examples. Am I missing something?

author: benSTmax
author_rank: Regular Contributor
timestamp: August 06, 2015, 09:01:39 pm
content: I don't have experience with the part you're using but the following recipes are good practices when designing low-power devices.Check for other leakages on your board (e.g. resistor dividers), put all the MCU pins that have pull-ups, pull-downs as inputs, try to stop the oscillator.Another trick is to keep the MCU in reset and measure the current. While in reset, the I/O pins are normally inputs and the oscillators should not run. If the current is around what you've measured, then you need to check outside the MCU for leakages.If the current drops around the expected figure, then you have to do more in the firmware.Good luck!

author: ralphd
author_rank: Frequent Contributor
timestamp: August 08, 2015, 11:44:59 pm
content: With the tiny and mega AVRs you nees to disable brown-out detection during sleep to minimize power.

author: Aleksandar B.
author_rank: Contributor
timestamp: August 09, 2015, 09:24:14 am
content: After some more digging I found out that the JTAG draws a lot of current, but at the moment, for some unknown reasons, I can't disable it, neither trough firmware nor fuse bits.
If you want to make STM32 F0x2 USB CDC working... - Page 1
Forum section: electronics / general

author: baoshi
author_rank: Regular Contributor
timestamp: April 14, 2015, 04:32:36 am
content: After working with the STM32Cube software, I have to agree with @dannyf that it is piece of crap.But the old library is no better. I stuck with the USB library (CDC) for couple of days and found some primary school level mistake by their engineer.So in case someone want to have their CDC example to work, use the patch attached.

author: Ribster
author_rank: Frequent Contributor
timestamp: August 07, 2015, 12:52:43 am
content: can you elaborate to what is wrong ?
MPLABX XC16 enhance code readability I/O bit-fields - Page 1
Forum section: electronics / general

author: Zeyneb
author_rank: Regular Contributor
timestamp: August 02, 2015, 05:34:17 pm
content: Regarding the C code when dealing with I/Os, I would like to refer to the schematic net names (like: DAC_CSn) and not to the MCU port pins (like: LATBbits.LATB5)So I order to get what I want I took a look on how these I/O bit-field look like in the device header files. Then I just copied that bit layout to my main c code file and made the following adjustments. Note this is actually XC8 code.typedef union{struct{unsigned :4; // RB0 to RB3 not present on this MCUunsigned DEMUX1_En :1; // RB4unsigned DAC_CSn :1; // RB5unsigned DAC_SCK :1; // RB6 DAC_SCK is controlled by SPI peripheralunsigned DAC_LDACn :1; // RB7};} B_LAT_TRIS_REDEFbits_t;extern volatile B_LAT_TRIS_REDEFbits_t LATB_REDEFbits @ &LATBbits;extern volatile B_LAT_TRIS_REDEFbits_t TRISB_REDEFbits @ &TRISBbits;With that @ operator I can place it directly at the same address of LATBbits and TRISBbits. Now I can use LATB_REDEFbits and use my own defined names. Only thing to remember is to reference portB.Now I've selected a 16-bit MCU and I want the same functionality with XC16. However I can't use the @ operator anymore. But with __attribute__((__sfr__)) I'm getting close:typedef struct tagB_LAT_TRIS_REDEF_BITS{unsigned MY_NAME0 :1;unsigned MY_NAME1 :1;unsigned MY_NAME2 :1;unsigned MY_NAME3 :1;unsigned MY_NAME4 :1;unsigned MY_NAME5 :1;unsigned MY_NAME6 :1;unsigned MY_NAME7 :1;} B_LAT_TRIS_REDEF_BITS;extern volatile B_LAT_TRIS_REDEF_BITS LATB_REDEFbits __attribute__((__sfr__));extern volatile B_LAT_TRIS_REDEF_BITS TRISB_REDEFbits __attribute__((__sfr__));The underscores around __sfr__ seems act as a placeholder for the actual address to be filled in during the linking process.It doesn't seem to be possible to access the actual addresses of the IO registers from the C code. Like I was capable of in the XC8 variant. The IO address constants are all defined in the linker script file for each device (the *.gld files). Therefore I had to write a little custom linker script (port_redefs.gld):----INCLUDE "p30F3012.gld"_LATB_REDEFbits = _LATBbits;_TRISB_REDEFbits = _TRISBbits;----In MPLABX I add this gld file to the Linker Files section. Then this one gets called during linking instead of "p30F3012.gld" in this case. This works.Maybe I put the redefinition bit-fields into a single header file. Then I just need to make such a header file for each board.Would this be a good approach? Do you think something could be better in this process? Anyway, I'd strive for maximum code readability and low maintenance. I can't seem to get rid of my custom gld file, can I?Best regards,Zeyneb

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 02, 2015, 08:49:45 pm
content: Any reason you can't just do "#define DAC_CSn LATBbits.LATB5"?

author: funkathustra
author_rank: Regular Contributor
timestamp: August 02, 2015, 11:57:18 pm
content: Quote from: Bruce Abbott on August 02, 2015, 08:49:45 pm+1.The preprocessor is your friend.
source for cheap smd resonators? - Page 1
Forum section: electronics / general

author: ralphd
author_rank: Frequent Contributor
timestamp: August 10, 2015, 12:53:50 pm
content: I can find 16Mhz crystals for 4-5c ea, but 25c is about the lowest I can find for SMD resonators. With nano clones that use 2 SMD resonators selling for <190c, where are the cheap resonators coming from?http://m.aliexpress.com/item/32418709242.html

author: tszaboo
author_rank: Super Contributor
timestamp: August 10, 2015, 03:02:16 pm
content: They are using the chinese equivalent of this:http://www.digikey.com/product-detail/en/CSTCE16M0V51-R0/490-5992-2-ND/2588524Internal market. They could even be the genuine part, or the ones which are out of spec.

author: michaeliv
author_rank: Frequent Contributor
timestamp: August 11, 2015, 01:22:19 am
content: I think that your pricing is slightly off.Crystal: 5cResonator: 12c -http://www.aliexpress.com/item/Free-shipping-100pcs-Original-Crystal-original-Murata-CSTCE-3-2-1-3-volume-16MHZ-16-000MHZ/32408016667.htmlNano Clone - 99c(though this one has only 1 resonator in the pics -- sorcery ?) -http://www.aliexpress.com/item/Free-shipping-Nano-V3-0-with-ATMEGA328P-FT232RL-FTDI-Micro-controller-Module-for-Arduino/32431064015.htmlSince resonators aren't particularly hot items I'm assuming that you can probably get them cheaper than 12c in high quantities, locally(In China).But yes that still wouldn't explain why they chose to go with parts that are apparently 2-3x more expensive than alternatives ( crystal + caps ).

author: ralphd
author_rank: Frequent Contributor
timestamp: August 11, 2015, 02:27:28 am
content: A 99c nano with FT232? That must be a ftdi clone. Still tempting when the cheapest ATmega328 pro minis I can find are $16/10.

author: tszaboo
author_rank: Super Contributor
timestamp: August 11, 2015, 07:51:55 am
content: Quote from: michaeliv on August 11, 2015, 01:22:19 amyour second link is 404 error. Resonators are smaller than crystals, that could be reason enough to use them.But to me honest I've never seen nano clone below 1 any kind of dollars.

author: michaeliv
author_rank: Frequent Contributor
timestamp: August 11, 2015, 05:19:48 pm
content: Quote from: NANDBlog on August 11, 2015, 07:51:55 amYup, they pulled the listing, when i checked it out it was live for 2 days and they sold 5 of them, maybe it was a price mistake.
MPLABX XC16 generate assembly listing file COFF / ELF agnostic - Page 1
Forum section: electronics / general

author: Zeyneb
author_rank: Regular Contributor
timestamp: August 01, 2015, 08:35:22 pm
content: Hi guys,It took me some effort to configure MPLABX to get the assembly listing file the way I wanted. So I would like to share this with you as there are many users of Microchip parts on this forum I think.This method works for me on my Windows XP x64 edition machine.MPLABX v3.05 and XC16 v1.24First you need to enable "Don't delete intermediate files" in the XC16 (Global Options)Then in Building you need to enable "Execute this line after build"In the field below I have:C:\dev\MCU\gen_asm_listing\gen_asm_listing.bat ${DEBUGGABLE_SUFFIX} ${ImageDir} ${PROJECTNAME} ${IMAGE_TYPE}You need to adjust the path part to point where you want the batch file to be. I have this purposefully outside the MPLABX installating folder. Because I might want to delete MPLABX and I might have forgotten about my tweak. So if MPLABX is deleted I still have that batch file.The contents of the batch file is:if "%1" == "cof" goto coff_file_format:elf_file_format@echo dump for ELF/DWARFxc16-objdump -omf=elf -S %2\%3.%4.elf > %2\%3.%4.lstgoto end:coff_file_format@echo dump for COFFxc16-objdump -omf=coff -S %2\%3.%4.cof > %2\%3.%4.lst:endCreate this batch file at the path I just mentioned.Now no matter whether you build with COFF or ELF you get the assembly listing in your [project dir]\dist\default\production folder.You might want to set some other preferences for the assembly listing file. The documentation is in [your XC16 install folder]\xc16\v1.24\docsThere is the PDF file: MPLAB XC16 ASSEMBLER, LINKER AND UTILITIES User’s Guide. In paragraph 15.5 is the part about xc16-objdump command line options.Good luck!Zeyneb
AVR fuse abstractions? - Page 1
Forum section: electronics / general

author: ralphd
author_rank: Frequent Contributor
timestamp: July 31, 2015, 04:19:21 pm
content: Is anyone aware of a library that fully abstracts AVR fuses? fuse.h from avr-libc only goes half way.http://www.nongnu.org/avr-libc/user-manual/group__avr__fuse.htmlIt abstracts the bit numbers of the fuse settings, but does not abstract LFUSE/HFUSE/EFUSE. So for example if I want to set the SPIEN fuse bit, I need to know that it is a LFUSE bit on the t13a, and HFUSE on the t84a.

author: mathsquid
author_rank: Frequent Contributor
timestamp: July 31, 2015, 08:53:32 pm
content: This is not what you're asking for, but it's what I always use to do fuse settings.http://www.engbedded.com/fusecalc/

author: ralphd
author_rank: Frequent Contributor
timestamp: July 31, 2015, 09:31:04 pm
content: Quote from: mathsquid on July 31, 2015, 08:53:32 pmI've used it too.If he published the source, that might give me something to work with...

author: neslekkim
author_rank: Super Contributor
timestamp: July 31, 2015, 11:00:27 pm
content: All the data seems to be in these files:https://github.com/thegaragelab/arduino/tree/master/USB_Programmer/progisp172/engie:https://github.com/thegaragelab/arduino/blob/master/USB_Programmer/progisp172/eng/ATmega328P.xmlJust googled after the filename fusecalc says it's using..
AVR write cal space undocumented command - Page 1
Forum section: electronics / general

author: ralphd
author_rank: Frequent Contributor
timestamp: July 31, 2015, 04:13:13 am
content: Anyone know what it is? I'm working on a stk500 compatible programmer and want to implement the calibrate osclator function by overwriting the signature row osccal value instead of just storing it in eeprom for software use.

author: ralphd
author_rank: Frequent Contributor
timestamp: July 31, 2015, 04:46:47 am
content: An old thread about the undocumented programming commands for reference.https://www.eevblog.com/forum/microcontrollers/how-bloody-hard-can-it-be-to-program-an-avr-chip/135/