hybridfree/eevblog-posts huggingface dataset:
Arduino Serial Monitor Clear? - Page 1
Forum section: electronics / general

author: tony3d
author_rank: Frequent Contributor
timestamp: January 22, 2014, 05:48:20 pm
content: Hi, I have a data logging program running thats logging light data from an LDR. Everytime I open the serial monitor, I have a line or two of left over data that pops up before my SD card gets setup. How can I have the serial monitor clear the entire screen when I call it up?

author: IanJ
author_rank: Unknown
timestamp: January 23, 2014, 12:09:21 pm
content: Hi,Strictly speaking the monitor is a debugging window only so as far as I know has no clear command. You could however use a terminal emulator program and just send the ascii clear code.........hmmm, possibly, as I haven't tried it.Ian.
Lattice iCEcube2 2013-12 for Linux - Page 1
Forum section: electronics / general

author: iabdalkader
author_rank: Newbie
timestamp: January 15, 2014, 02:55:21 pm
content: Hi,Has anyone tried downloading the new iCEcube2 for Linux/Windows ? I've been trying for a couple of weeks now, but almost all links are broken, I tried contacting their tech support, marketing, webmaster but they keep ignoring me, and I can't submit any support tickets because their support system seems to be broken as well.. and when finally someone replied via twitterhe assured me that their website is working greatAnyway, I was wondering if anyone else having problems with the website ? and if someone managed to downloaded it somehow, if so, would it be possible to upload it somewhere else ?I'm having some problems with the old iCEcube2 for Linux, and as I said I can't contact tech support, and was hoping the new version fixes the issue..Here's a link to iCEcube2 download page:http://www.latticesemi.com/Products/DesignSoftwareAndIP/FPGAandLDS/iCEcube2.aspxThanks.

author: lorth
author_rank: Contributor
timestamp: January 15, 2014, 04:02:18 pm
content: Use Twitter, as for my experience, the answer is much faster... I contacted TI once because I couldn't download TINA and nothing. I contacted their twitter, 20min later I had an answer and 1h after that the link was working...

author: iabdalkader
author_rank: Newbie
timestamp: January 15, 2014, 05:55:32 pm
content: Quote from: lorth on January 15, 2014, 04:02:18 pmI did contact them via twitter, twice! and they told me that all links are working!

author: andyturk
author_rank: Frequent Contributor
timestamp: January 15, 2014, 07:59:56 pm
content: For what it's worth, I was able to download and install the windows version a couple of days ago. I haven't done anything with it yet, but it did install three or four different things along the way.

author: iabdalkader
author_rank: Newbie
timestamp: January 16, 2014, 04:10:08 pm
content: Quote from: andyturk on January 15, 2014, 07:59:56 pmI changed the country to US in my profile, and suddenly all the links are working! I'm not sure what that means, anyway, thanks.
Develop Apps for Embedded Android Networking - Free course - Page 1
Forum section: electronics / general

author: santiniuk
author_rank: Contributor
timestamp: January 12, 2014, 03:03:07 pm
content: Hi,For anyone interested in a free course that looks quite good I stumbled across one starting this week. Jan 13th - 17th. (2014)January 13 - Day 1: Basic4Android Wireless Digital I/O AppJanuary 14 - Day 2: A Basic4Android USB-Based Digital I/O AppJanuary 15 - Day 3: A Basic4Android USB-Serial-Based Digital I/O AppJanuary 16 - Day 4: Basic4Android Sockets and Digital I/OJanuary 17 - Day 5: A Basic4Android HTTP Server AppDownload files are available now.My interest is based in using Basic4Android with some Bluetooth serial modules. This course looks ideal. (Hopefully) !http://www.designnews.com/lecture-calendar.aspThanks

author: Harvs
author_rank: Super Contributor
timestamp: January 14, 2014, 04:40:07 am
content: Ok I signed up for this thinking they might have a different take on it (i.e. implementation pattern), since implementing Bluetooth throughout the full Android application life cycle isn't all that straightforward.But note it is a course on using the "Basic4Android" platform to make simple applications. Not a course on normal I/O programming for Android.Perhaps I should do a youtube series on Bluetooth with Android for embedded systems.
68hv11 and 68hc811 Decompiling tool - Page 1
Forum section: electronics / general

author: Clint
author_rank: Regular Contributor
timestamp: January 10, 2014, 08:48:08 am
content: Can someone point me in the right direction for a good preferably free tool for the disassembly of (specifically 68HC11) and (maybe 68HC811) MCU'sI have tried some dos ones but they are hard to deal with I know a lot about the hardware locations so am hoping I can work out what's going on with this detail.My ultimate goal is to create a decompiled version that will recompile if that's wasnt obvious, I am not generally hacking I want to add a few features and being 80's hardware the manufacture is long gone.

author: legacy
author_rank: Super Contributor
timestamp: January 10, 2014, 10:31:26 am
content: i used BUFALO directly on bloard, it is a good de-asmwhich board do you have ?

author: Clint
author_rank: Regular Contributor
timestamp: January 10, 2014, 05:35:07 pm
content: No Board I only have the device and a home built simulator for the inputs, so All I have is the bon file of the External ROM.I was hoping to try and disassemble the file and reassemble it to a working ROM.

author: legacy
author_rank: Super Contributor
timestamp: January 10, 2014, 06:32:09 pm
content: have you triedthis?

author: Clint
author_rank: Regular Contributor
timestamp: January 10, 2014, 07:10:12 pm
content: Quote from: legacy on January 10, 2014, 06:32:09 pmNo but it does not mention disassembling?

author: G0HZU
author_rank: Super Contributor
timestamp: January 10, 2014, 07:50:01 pm
content: I would use IDA Pro for this.Even an old version will have support for the 6811. Eg something like Ver 4.3 from 12 years ago.I don't use IDA Pro as much as I used to but it was easily the best disassembler. Very powerful and you can write your own modules for it if there is an MCU that it doesn't support.I'd be surprised if there's anything better today but if there is then I'd be interested to see it

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 11, 2014, 10:31:18 am
content: What is the nature of your planned extensions? Think - do you really need a full disassembly? In some cases it is easier just to paste a piece of new code into a free space at the end of ROM and patch a couple of jumps/calls to point there. Obtaining a fully reassemblable source is not a trivial task - simple automatic "bin to asm converter" style tools often produce conflicts like data misinterpreted as code and vice versa. If you are still willing to do that - go for IDA Pro as G0HZU advised. IDA is interactive - you can tell it "you are wrong here, these 16 bytes are data".

author: Clint
author_rank: Regular Contributor
timestamp: January 11, 2014, 05:40:09 pm
content: I really would like a full disassembly, another user came to the rescue with IDA Pro, I will see what I can do in the next week, expect some shouting for help lol !
Use Eval kit as Cheap JTAG Debugger/Programmer - Page 1
Forum section: electronics / general

author: han
author_rank: Frequent Contributor
timestamp: January 10, 2014, 08:59:20 am
content: hi all,i have MACHXO2 7000HE breakout board,and it use FTDI 2232HL IC and EEPROM configuration IC,i planning to used for programming/debug microcontroller STM32F407 and ATMEGA.but the big question is: Is it even possible??if yes, is it can be used without modification in EEPROM / internal configuration frimware?and how about the performance of FTDI 2232HL ?since decent JTAG programer hardware is quite expensive..

author: Torrentula
author_rank: Regular Contributor
timestamp: January 10, 2014, 10:24:46 am
content: It should work with OpenOCD as it supports both FT2232 based JTAG dongles and the STM32F4. I'm not sure if the config in the EEPROM of the device will be supported though.I am not sure about the ATmega as I have never tried to program those over JTAG but it should be fine as long as either the Atmel tools support the FT2232 or you can make OpenOCD to program the ATmega (you should only have to write a configuration file at most).You'll have to have a look at the schematic of your Lattice eval kit. My MachXO board has got an FT2232, too (which unfortunately I blew last week). On that board one of the FT2232's interfaces is connected to the CPLDANDthe JTAG header, so only one interface is easily accessible.You can always solder some fine wire to the pins of the IC itself, of course.
Microchip - Page 1
Forum section: electronics / general

author: TheCommonCathode
author_rank: Contributor
timestamp: January 07, 2014, 10:56:06 pm
content: Anyone have a data sheet on this?40-pin.Sent from my iPad usingTapatalk

author: nctnico
author_rank: Super Contributor
timestamp: January 07, 2014, 11:02:51 pm
content: That is the logo from Motorola (nowadays Freescale or ON semiconductor).

author: TheCommonCathode
author_rank: Contributor
timestamp: January 07, 2014, 11:05:10 pm
content: Yup.Sent from my iPad usingTapatalk

author: wilheldp
author_rank: Regular Contributor
timestamp: January 07, 2014, 11:25:42 pm
content: Quote from: TheCommonCathode on January 07, 2014, 11:05:10 pmThen why is this thread titled "Microchip"? Microchip (maker of the PIC) is not the same as Motorola. Then again, I guess you could have been using the generic form of microchip just to physically describe the IC (not the manufacturer of said IC). Confusing nonetheless.

author: TheCommonCathode
author_rank: Contributor
timestamp: January 07, 2014, 11:41:09 pm
content: Yes, I'm referring to it as the generic term. Not the company.Sent from my iPad usingTapatalk

author: marshallh
author_rank: Unknown
timestamp: January 08, 2014, 12:22:15 am
content: Probably a mask programmed 68xx. Dead giveaway when it states the mask rom version right there. Year of manufacture is 1994It could also be an outside vendor's design fabbed by Motorola.
Pinguino PIC18F26J50 board kit - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: January 05, 2014, 07:13:57 pm
content: I've just bought myself a PIC18F26J50 kit to have a play with. I'm mainly interested in the USB capabilities of the chip and the Arduino like IDE and code. Seems like it drives the SDCC (small device C compiler) under the hood so it should be easier to work with.I've got a small project I'd like to try out with it. I'll let you all know how I get on later on.David.PS It cost around £15.00 including delivery.
Lattice MachXO2 - Page 1
Forum section: electronics / general

author: han
author_rank: Frequent Contributor
timestamp: January 04, 2014, 12:23:44 am
content: hi alli have lattice machXO2 7000, but having a problem with frist step in my learning curve.i familiar with c programming, but VHDL new for mebut steeping to FPGA/CPLD is quite difficult to learn,i have search youtube and goggle for fpga tutorial, but most of them is XILINX not latticeis i have to learn xilinx ISE frist, or just jump try and error with diamond tools?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 04, 2014, 12:29:14 am
content: Lattice tools look almost identical to Xilinx - I'm sure a lot of it is the same code.The workflow is pretty much the same, so a Xilinx ISE tutorial won't be too different

author: han
author_rank: Frequent Contributor
timestamp: January 04, 2014, 12:53:36 am
content: ok,thanksi should to get start now..
Atmega 328 - sharing I2C pins with a 595 - Page 1
Forum section: electronics / general

author: netdudeuk
author_rank: Frequent Contributor
timestamp: December 30, 2013, 04:58:23 pm
content: HiI've got an Atmega 328P with the Arduino Uno code and it's been working very well. I've been using A4 (the I2C SDA pin) and A5 (the I2C SCL pin) to drive the data and latch pins of a 74HCT595 but now I would like to connect an LCD display which has one of those I2C to parallel convertors. The theory was that it didn't matter if the 595 and the I2C interface saw junk heading out for the opposite device but as soon as I connect the display, which displays information from the Atmega ok, it causes (as yet unknown) issues elsewhere. Is there anything obviously wrong with wanting to get this to work and any quick solutions ? I don't have any other spare pins.Thanks

author: dannyf
author_rank: Super Contributor
timestamp: December 30, 2013, 06:20:00 pm
content: Yes, if the avr acts like a master. However, you will have to disable the hardware i2c when writing to the shift register and re-enable it before any i2c transmission.Alternatively, you can use software i2c.
Can anyone help me with the NVIC problem on ARM Cortex-M3? - Page 1
Forum section: electronics / general

author: danellis
author_rank: Newbie
timestamp: December 25, 2013, 07:46:02 am
content: I've been banging my head against this problem for a couple of weeks now, so I'm hoping for a Christmas miracle :-) I've been over the code so many times that I'm pretty sure it must be down to me having some misunderstanding about how the NVIC works. The details are on this Stack Overflow question:http://stackoverflow.com/questions/20741462/task-switching-on-cortext-m3-crashes-after-irqIn summary, I have a task switches that normally works fine. When a task needs UART input that isn't there yet, it blocks, and that works okay. When the UART interrupt fires, the task is unblocked, and then after switching to it (not once, but the second time) the CPU faults with a INVPC usage fault. According to the docs, I *think* this is telling me that I'm putting an invalid EXC_RETURN value into the PC (although the PC in the panic is weird too, so maybe it's something after the interrupt return). I checked, and I'm actually putting 0xFFFFFFFD in there, which is an interrupt-return back to thread mode. It seems like that's what I would want, as I'm returning back to whatever task was switched to, so I don't see what the problem is.The relevant bits of code and debug output are on the SO question. I can supply more code if necessary. The chip is an NXP LPC1769.Help!

author: nctnico
author_rank: Super Contributor
timestamp: December 25, 2013, 07:32:45 pm
content: So you are tampering with the IRQ stackframe? I'd investigate on how the interrupt controller works exactly. Did you enable nested interrupts?

author: danellis
author_rank: Newbie
timestamp: December 25, 2013, 10:43:56 pm
content: I don't tamper with any stack frames, but stack corruption is looking like a strong possibility.

author: danellis
author_rank: Newbie
timestamp: December 27, 2013, 09:24:22 am
content: Finally fixed it! Here's the answer I put on SO:Quote
PICkit UART tool query - Page 1
Forum section: electronics / general

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 27, 2013, 04:18:10 am
content: I was testing the ADC of a PIC18F4550 & got it to read values off a 10k POT. The hex values were being display on the UART monitor given with the PICkit-2 application. I noticed that each hex value being transmitted ended with a "0A". I have attached a snapshot of the same. Can anyone tell me what it is for?Since the code & circuit seem to work fine, I have not posted any schematics or code. Let me know if you want me to upload them as well.

author: mariush
author_rank: Super Contributor
timestamp: December 27, 2013, 04:29:53 am
content: 0x0A is short for LINE FEEDIt's the ASCII character that makes the console advance to a new line.In Windows when you press ENTER, you basically introduce two invisible characters, 0x0D + 0x0A (CARRIAGE RETURN + LINE FEED)CARRIAGE RETURN (the name) is from the old days of typewriters, basically puts the cursor back on the first character in the line. Other systems only send 0x0A because it's assumed that when you say "new line" you want the cursor automatically moved on the first character position.ps. it even says in the picture now that i had a second look ... see that "ascii newline = 0D 0A"

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: December 27, 2013, 05:03:18 am
content: Oh...okay got it. Thanks a lot.
PWM with atmega324pa - Page 1
Forum section: electronics / general

author: MarkoAnte
author_rank: Regular Contributor
timestamp: December 26, 2013, 12:36:05 pm
content: Hi,I'm trying to make a pwm signal and I started by using this code:/** Voscilnicaosciloskop.c** Created: 24.12.2013 15:10:32* Author: Alucard*/#define F_CPU 18432000UL#include <avr/io.h>#include <avr/interrupt.h>#include <util/delay.h>double dutycycle = 0;int main(void){DDRB = 0xff;TCCR0A = (1 << COM0A1) | (1 << WGM00) | (1 << WGM01);TIMSK0 = (1 << TOIE0);OCR0A = (dutycycle/100.0)*255;sei();TCCR0B = (1 << CS00);while(1){_delay_ms(100);dutycycle += 10;if(dutycycle > 100){dutycycle = 0;}}}ISR(TIMER0_OVF_vect){OCR0A = (dutycycle/100.0)*255;}The problem I have is wiht the delay. I set the fuse bits so that the cpu runs off a external 18.432 Mhz clock and I get a 71.9 kzh pwm output - witch is ok as 18mhz/255(8 bit timer)- is the 72 kzh signal. The problem is that it is really slow on the delay, it hold the same duty cycle for a long time, the problem is fixed when I enter the f_cpu as the 72 khz I'm getting form the pwm output.Why is this and how do I make it work properly?

author: dannyf
author_rank: Super Contributor
timestamp: December 26, 2013, 02:59:22 pm
content: QuoteEasy:1) compare the code vs. the datasheet to see what it is trying to do;2) then figure out if it is doing what it is trying to do.Quote3) if not, try to figure out how to do what you are trying to do.

author: filip_cro
author_rank: Regular Contributor
timestamp: December 26, 2013, 08:30:56 pm
content: What kind of signal are you trying to make?Now you get change every 100 ms ( by using _delay_ms(100); ) in while loop. Understand?Why not putting something like OCR0A += 25; in TIMER0_OVF interrupt. And use OCR0A interrupt so you wont lose count if OCR0A = 255.

author: Lajon
author_rank: Contributor
timestamp: December 26, 2013, 09:18:35 pm
content: QuoteNo far from that - this is the problem OP is having.The main program (which is mainly the _delay_ms call) is starving because of the heavy computation done in the ISR. There is really no need to use a double in this program - also no need to compute the value for OCR0A inside the ISR. You can add a counter inside the ISR and base the timing in main on that (or use another timer) but the delay_ms will approach 100ms if the ISR is made (a lot) faster.

author: filip_cro
author_rank: Regular Contributor
timestamp: December 26, 2013, 10:36:34 pm
content: Quote from: Lajon on December 26, 2013, 09:18:35 pmWell he wouldn't see difference between 7190 and 7191 times of x% duty cycle. And he said that problem was sold by using smaller delays (by using smaller frequency F_CPU) so he probably want change every time timer is started.
using an fpga for led cube control - Page 1
Forum section: electronics / general

author: naimis
author_rank: Contributor
timestamp: October 05, 2013, 02:36:54 pm
content: I'm about to embark on assembling another LED cube (orange, for the Halloween season), and was thinking of ordering an FPGA eval board at the same time. Some months ago I'd poked around with Xilinx' dev software with the intent of making a "24-bit" full color RGB LED cube. The microcontrollers I'd been using up to then couldn't handle the refresh/scan rate required so the intent was to go FPGA.I've leaned toward a Digilent eval board w/ breadboard attachment to get started with. Xilinx partially due to brand recognition but the fact that I work with a number of experienced Xilinx users makes it more appealing, knowing I have people I can ask questions. I figured I could experiment and learn fpga development using my original LED cube while I have the seasonal orange one on displayAm I nuts? Is Xilinx the wrong choice here?

author: Dago
author_rank: Frequent Contributor
timestamp: October 05, 2013, 03:05:06 pm
content: Xilinx has nice chips but I VASTLY prefer the Altera tools.The Xilinx software has to be the most buggiest piece of crap software I've ever used.

author: hughes_k
author_rank: Contributor
timestamp: October 07, 2013, 12:26:57 am
content: I've never used any FPGA design software other than the Xilinx ISE Webpack, and while it is buggy in a few spots, it's nothing that will "ruin your day," just quirks that you see once and work with from then on. A lot of software is like that, I find...The Digilent boards are nice. I'm also tempted by the Mojo hobbyist board since it has a bunch of I/O and is cheap.

author: kunzem
author_rank: Contributor
timestamp: December 24, 2013, 01:49:44 am
content: Risking a necro but i got a similar project in first prototype atm:Led Cube 8x8x8 RGB driven by TLC5941 12bit ic'sAll low level control (multiplexing, SPI to the drivers and timings) are done by an spartan3 that is still abit boredthe spartan3 is feed by SPI from an raspberry with 24bit/pixel datathe spartan has an brightness table for each color to translate 8bit to 12bit with nice curveyou can feed all data to the spartan via SPI, position mappings, current setting for each LED and the brightness tables.i thinking about to put the project up here in a thread if you are interested.regards
Erasing a PIC - Page 1
Forum section: electronics / general

author: AtomAmp
author_rank: Newbie
timestamp: December 05, 2013, 05:23:45 pm
content: If you place a brand new PIC in a programmer and click on, "Erase" will it lose it's initial program?

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: December 05, 2013, 05:36:47 pm
content: DependsFirstly are you talking about a pic with a bootloader, i can't answer that cos I’ve never played with bootloaders on pic's ( yet )If it doesn't come with a bootloader then there is no 'program', it's blank.On some pic's there is a clock calibration value stored at ox3ff ( if i remember correctly ). Some programmers will read this value, erase the chip and then re-write the saved value back, and then again, some won't.I've always found the pickit2 erases it and doesn't re-write. But pickit2 does have a clock calibration option.

author: macboy
author_rank: Super Contributor
timestamp: December 05, 2013, 07:47:30 pm
content: PIC chips from factory are shipped blank, except for an oscillator calibration, usually stored in the highest address. There is no "initial program". All locations are usually "all 1's" or "all 0's", either of which execute as a NOP.If you buy a chip that is pre-programmed with a bootloader, then generally you do not use a programmer (e.g. pickit 3) to re-program this, you use the bootloader. The bootloader is designed to not erase itself.Pickit 3 allows you to specify a range to be erased and/or programmed (usually pre-defined chunks/blocks). I am not sure if this works with all devices, but I know that some devices allow block erasing rather than whole-chip erasing. One caveat is that you may need to do a whole-chip erase to clear some configuration bits (like code protect). Good old PIC16F877 is a chip that supports 'block' erase and per-block code protection. Many many more support it too.If you accidentally use a programmer to erase a bootloader from a PIC, you can use the same programmer to program the bootloader back onto the chip. You usually need only the HEX file.

author: AtomAmp
author_rank: Newbie
timestamp: December 10, 2013, 09:11:42 pm
content: Thanks guys...!
NI myDAQ - Page 1
Forum section: electronics / general

author: CPU-11
author_rank: Newbie
timestamp: December 04, 2013, 10:12:22 am
content: Hello everybody,My problem is that I ordered NI myDAQ while ago. But they sent me an email telling me that they are only shipping within the USA, so they cancelled my order. I searched everywhere in the Internet but I couldn't find a site that will ship it to Bahrain.I think i should find an alternative device, so what do you think of Arduino+LabVIEW Bundle as a substitute for NI myDAQ?, are they similar in their functions and codes.http://www.amazon.ca/SparkFun-Arduino-LabVIEW-Bundle/dp/B0089SIO0S/ref=sr_1_2?s=electronics&ie=UTF8&qid=1386150538&sr=1-2&keywords=labview

author: slateraptor
author_rank: Frequent Contributor
timestamp: December 05, 2013, 06:24:21 am
content: http://www.nonolithlabs.com/cee/Once upon a time, I argued against it. Price has dropped by 33% since Kickstarter days, and although I haven't personally verified, surely software front end has since been refined.If your heart is set on acquiring a MyDAQ, a periodic inquiry on eBay is probably your best bet.

author: mtdoc
author_rank: Super Contributor
timestamp: December 05, 2013, 07:05:22 am
content: It kind of depends on what you want to do. The Sparkfun Labview bundle is a great deal if you want to use Labview and the Labview interface for Arduino is a great tool for interfacing the two, but you won't get the same out of the box DMM, DSO, function generator, spectrum analyzer you get with the myDAQIf you want those things in a small myDAQ like package - I'd look at theAnalog Discoverywhich has better specs than the myDAQ and also has a logic analyzer.
Mysterious Catastrophic Failure of PICs ?? - Page 1
Forum section: electronics / general

author: Icarus
author_rank: Regular Contributor
timestamp: December 03, 2013, 07:17:49 pm
content: Hi everyone;I'm trying to make BLDC motor driver for my toy quad copter project.For the microcontroller aspect it is no different from blinking Leds. I soldered the PIC and it was working.So, when I have begun to test h-bridges (with NO LOAD) ,the PIC became a shortcircuit.I tested regulator immediately (LD1117) and it was just fine. PCB is okay and no wrong footprints.I'm very surprised I've no idea what happened.Is there any counterfeit pics ??

author: Svuppe
author_rank: Regular Contributor
timestamp: December 03, 2013, 09:12:21 pm
content: I don't know about the PIC, but there is an obvious fault in your gate driver.When Q5 turns on, the E-B diode of Q4 will make a big fat short from 12V to Q5 and ground. Maybe Q5 fails in a way so you're getting overvoltage fed backwards into the PIC?

author: free_electron
author_rank: Super Contributor
timestamp: December 03, 2013, 09:14:14 pm
content: back emf and virtground can be higher than vcc of the pic... that may cause latchup

author: Icarus
author_rank: Regular Contributor
timestamp: December 03, 2013, 09:33:54 pm
content: Ouch ! I completely missed those.Thank you so much guys.
Getting started with TI's Code Composer for MSP430 - Page 1
Forum section: electronics / general

author: TimNJ
author_rank: Super Contributor
timestamp: December 02, 2013, 12:12:17 am
content: Hi guys,I'm a first year EE student. My college seems to be pushing Arduino, and while I see how it makes a good introduction to microcontrollers, I think they should really use something more industry accepted. Over winter break, which is coming soon, I want to do a little bit of experimenting with MSP430. I have NO experience with them at all, but I really do want to give them a try.I've downloaded Code Composer Studio. It's based off Eclipse which I've used before, but I still don't know much about programming microcontrollers, other than what I have briefly learned with Arduino. I'm also not an Arduino expert by any means. I just want to try learning something more practical.What's a good way to get started? Interestingly, the school engineering library has MSP430 Microcontroller Basics, which I've skimmed through. I wonder if it applies to CCS as well. They seem to reference the IAR IDE a lot. Any simple-ish tutorials out there?Thanks.

author: Stonent
author_rank: Super Contributor
timestamp: December 02, 2013, 12:33:55 am
content: You can use Energia to program the MSP430, it's a port of Arduino for it. It might be a good transition to CCS because you name the pins by port rather than just the pin #.You'll need to learn how to address the pins first when moving to any different MCU platform.

author: westfw
author_rank: Super Contributor
timestamp: December 02, 2013, 04:40:29 am
content: IIRC, TI had some pretty good tutorials for their launchpads. (The one I looked at in detail was for the Stellaris Launchpad, but it looks like they have similar things for MSP430.)http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_Workshop

author: TimNJ
author_rank: Super Contributor
timestamp: December 02, 2013, 07:44:11 am
content: I remember reading about Energia somewhere. If I can't seem to learn CCS with enough ease, maybe I'll try it as a stepping stone.West, thanks for sharing. Those do indeed look to be high quality resources. That's probably what I'll try using at first.

author: rsjsouza
author_rank: Super Contributor
timestamp: December 02, 2013, 11:48:18 am
content: You may also want to take a look at theMSP430Ware.Specifically for CCS, check itsgetting started guideand itstraining page. After getting your feet wet, thewiki categoryhas dozens of pages that talk about various things.
[AVR] Cannot get the ADC value in Atmel Studio ! ADC register is not working - Page 1
Forum section: electronics / general

author: expertmax
author_rank: Regular Contributor
timestamp: November 23, 2013, 04:11:20 am
content: Hi !I have another issue !Cannot get the ADC to work properly, the LED will only come on at 5V on the potentiometer !Code:#define F_CPU 16000000UL#include <avr/io.h>#include <avr/interrupt.h>#include <util/delay.h>int cylinder = 5;uint16_t injection_time = 0;uint16_t injection_gap = 0;void delay(int t);void cycle(void);void sendFuel(int injector);void sendSpark(int coil);void getTPSValue(void);int main(void){DDRC |= (1 << PORTC0) | (1 << PORTC1) | (1 << PORTC2) | (1 << PORTC3) | (1 << PORTC4) | (1 << PORTC5);MCUCR |= (1 << ISC01) | (1 << ISC00) | (1 << ISC11) | (1 << ISC10);GICR |= (1 << INT0) | (1 << INT1);ADCSRA |= (1 << ADPS0) | (1 << ADPS1) | (1 << ADPS2) | (1 << ADEN);ADMUX |= (1 << REFS0) | (1 << ADLAR);sei();while(1){getTPSValue();if(injection_time < 512){PORTC |= (1 << PORTC0);}if(injection_time > 512){PORTC &= ~(1 << PORTC0);}}}void delay(int t){while (t != 0){_delay_ms(1);t = t - 1;}}ISR(INT0_vect) // CKP{cylinder++;cycle();}ISR(INT1_vect) // CMP{cylinder = 0;}void cycle(){if(cylinder == 1){sendFuel(PORTC0);sendSpark(PORTC4);}if(cylinder == 2){sendFuel(PORTC2);sendSpark(PORTC5);}if(cylinder == 3){sendFuel(PORTC3);sendSpark(PORTC4);}if(cylinder == 4){sendFuel(PORTC1);sendSpark(PORTC5);}}void sendFuel(int injector){PORTC |= (1 << injector);delay(35);PORTC &= ~(1 << injector);delay(35);}void sendSpark(int coil){PORTC |= (1 << coil);delay(10);PORTC &= ~(1 << coil);}void getTPSValue(){ADCSRA |= (1 << ADSC);while(!(ADCSRA & (1 << ADIF)));ADCSRA |= (1 << ADIF);injection_time = ADC;_delay_ms(1);}Thank you so much for your help !EDIT: Did some tests and it seems like the register ADCL is totally empty, whatever the input voltage on ADC0 is !

author: Psi
author_rank: Super Contributor
timestamp: November 23, 2013, 04:24:26 am
content: PORTC0 looks odd, it would usually be PC0But that's probably just a new naming convention i've not seen yet.

author: Psi
author_rank: Super Contributor
timestamp: November 23, 2013, 04:31:50 am
content: It's probably ADLAR=1 that's causing your problem. (left align)Using the ADC macro with ADLAR =1 probably results in bad data (Low High bits around the wrong way).The reason the ADLAR option exists is so you can read the 8 MSB in one operation (when you don't care about 10bit resolution for your application).Since you want the full 10bits (0-1024) you want ADLAR=0 (default).That way when you read the ADC macro it will assemble and output a 16bit word correctlyTry changingADMUX |= (1 << REFS0) | (1 << ADLAR);toADMUX |= (1 << REFS0) ;

author: expertmax
author_rank: Regular Contributor
timestamp: November 24, 2013, 05:43:04 pm
content: Quote from: Psi on November 23, 2013, 04:24:26 amPC0 is not recognized by Atmel Studio (anymore?). Anyway PORTC0, PC0, PINC0 yield the same hex value.Quote from: Psi on November 23, 2013, 04:31:50 amYes, it did the trick. I also took more time to read the datasheet thoroughly and now I understand the whole concept behind the ADC, thanks for the input tho !
Looking for Low-Cost FPGA Solution for 5V System Interfacing - Page 1
Forum section: electronics / general

author: qbradq
author_rank: Newbie
timestamp: November 17, 2013, 06:16:42 pm
content: Hi all! I've just found David's YouTube channel and mentions of the forum. What a great resource! I'm a software engineer by trade and getting into EE on the side.Anyhow, I've been working on a project over the past month to provide a very complex memory mapping solution to an old 5V microprocessor system using an FPGA. Right now I'm looking at using the Lattice MachX02 2000 series FPGA with logic level converters. It's the most cost-effective solution I have been able to find so far, but I was wondering if anyone else had experience with other solutions?FYI, the density selection is being driven by the Lattice SD Flash Reference Implementation, which requires nearly half of the FPGA logic resources! While we're on the topic, does anyone know of a more cost-friendly SD Flash solution? This is accounting for about $4 in the DFM BOM.

author: nctnico
author_rank: Super Contributor
timestamp: November 17, 2013, 06:22:56 pm
content: Look at the XC9500 series from Xilinx. They have 5V tolerant I/O although they are powered from a 3.3V supply. You could raise the supply voltage to 3.6V in case you have troubles with logic levels. You could use a low cost ARM microcontroller for the SD card interface using SPI.

author: olsenn
author_rank: Frequent Contributor
timestamp: November 17, 2013, 06:48:29 pm
content: Have you ruled out CPLD's? They're much cheaper!

author: qbradq
author_rank: Newbie
timestamp: November 18, 2013, 02:48:49 am
content: I was going with FPGA's because I'm doing quite a lot on the logic side. I'm implementing a wide variety of legacy memory mapping hardware that is select-able at run-time, and I'm also implementing several special interfaces, like serial and parallel EEPROM emulators that read and write to block RAM.This kind of thing doesn't seem well suited to CPLDs, but is surprisingly light on general-purpose logic resources on the MachX02 platform when you leverage the hardened resources well.

author: nctnico
author_rank: Super Contributor
timestamp: November 18, 2013, 03:58:10 pm
content: You can actually do a lot of things with a CPLD. I've used CPLDs to convert CRT to TFT which sometimes requires grabbing an entire frame into SRAM (odd/even frames) and then combine those into TFT compatible output. I use VHDL just as if it is an FPGA.

author: bingo600
author_rank: Super Contributor
timestamp: November 24, 2013, 04:02:28 pm
content: These guyzz have "busdrivers" on some of their boards , making them 5v tolreanthttp://enterpoint.co.uk/Ie.http://www.enterpoint.co.uk/shop/en/48-craignell1.htmlhttp://www.enterpoint.co.uk/shop/en/25-craignell2.htmlThere might be other/Bingo
[AVR] Must multiply the TCNT1 value by 8 for accuracy !! - Page 1
Forum section: electronics / general

author: expertmax
author_rank: Regular Contributor
timestamp: November 22, 2013, 04:12:35 am
content: Hi !I've ran into a bit of trouble recently with my AVR !I'm using AVR Studio 6.1, programming a ATMega32A with a USBTinyISP.I just switched from the _delay_ms() to using timers !My fuses are set to use the internal clock of 1Mhz (CKSEL = 0001, SUT = 10).My code is set to use a prescaler of Fcpu/64.When I try to catch one second from the timer, the value is actually faster than what it should be so I have to multiply the value by 8 if I want a precise and accurate value of 1 sec.This is my code :Code:#include <avr/io.h>#include <avr/interrupt.h>int cylinder = 5;int injection_time = 0;int injection_gap = 0;void timerDelay(int delay);void cycle(void);void sendFuel(int injector);void sendSpark(int coil);int main(void){DDRC |= (1 << PORTC0) | (1 << PORTC1) | (1 << PORTC2) | (1 << PORTC3) | (1 << PORTC4) | (1 << PORTC5);MCUCR |= (1 << ISC01) | (1 << ISC00) | (1 << ISC11) | (1 << ISC10);GICR |= (1 << INT0) | (1 << INT1);TCCR1B |= (1 << CS10) | (1 << CS11);sei();while(1){;}}void timerDelay(int delay){TCNT1 = ((((1000000 / 64) * delay) / 1000) * 8);do{TCNT1 = TCNT1 - 1;}while(TCNT1 > 0);}ISR(INT0_vect) // CKP{cylinder++;cycle();}ISR(INT1_vect) // CMP{cylinder = 0;}void cycle(){if(cylinder == 1){sendFuel(PORTC0);sendSpark(PORTC4);}if(cylinder == 2){sendFuel(PORTC2);sendSpark(PORTC5);}if(cylinder == 3){sendFuel(PORTC3);sendSpark(PORTC4);}if(cylinder == 4){sendFuel(PORTC1);sendSpark(PORTC5);}}void sendFuel(int injector){PORTC |= (1 << injector);timerDelay(1000);PORTC &= ~(1 << injector);timerDelay(1000);}void sendSpark(int coil){PORTC |= (1 << coil);timerDelay(10);PORTC &= ~(1 << coil);}For example on my AVR, if I want to catch 1 second, I have to do this formula : (((1Mhz / 64) * 1sec ) * 8I mean, it works right now with my formula and I'm pretty sure it's running spot-on !What am I doing wrong ?Thanks !!

author: Stonent
author_rank: Super Contributor
timestamp: November 22, 2013, 04:20:13 am
content: Sounds like you've got one of the fuses set wrong.What is CKDIV8 set to?

author: DRT
author_rank: Regular Contributor
timestamp: November 22, 2013, 09:27:29 am
content: TCNT1 changes by itself. You don't need to decrement it in a loop. My preferred approach is to use the OutputCompare registers, i.e load OCR1A with (TCNT + [time delay]), then spin waiting for the OCF1A flag, or enable the corresponding interrupt.

author: expertmax
author_rank: Regular Contributor
timestamp: November 23, 2013, 04:06:53 am
content: Yes, enabling the OCR1A register obviously solved the issue !Thanks.
Which device do I need to read out a PIC18F8720 with ICSP? - Page 1
Forum section: electronics / general

author: Kjelt
author_rank: Super Contributor
timestamp: November 19, 2013, 09:11:07 pm
content: Hi, I am not very familiar with Microchips PIC controllers so probably a beginners question for some of you.I have multiple commercial devices with different firmware versions that I would like to check if I can read them out (small chance probably but hey I can give it a try) and flash them all with the latest firmware.What is the cheapest device available to read out a PIC18F8720 with low voltage ICSP?Thanks in advance people for the help

author: Hideki
author_rank: Frequent Contributor
timestamp: November 19, 2013, 09:49:57 pm
content: Microchip PICKIT 3 is the standard cheap tool, but you can probably get an ever cheaper clone from china if $45 is too much.

author: Kjelt
author_rank: Super Contributor
timestamp: November 19, 2013, 10:19:49 pm
content: Ok thanks would the predecessor (pickit 2) also work? I might be able to lent that from a colleague.

author: Hideki
author_rank: Frequent Contributor
timestamp: November 19, 2013, 10:30:45 pm
content: yes

author: amyk
author_rank: Super Contributor
timestamp: November 20, 2013, 08:41:24 am
content: You can do it witha few wires and a parallel port... ditto for the AVRs.

author: kayvee
author_rank: Regular Contributor
timestamp: November 20, 2013, 08:48:52 am
content: It's highly unlikely that you will be unable to do that as the norm is to enable the code protection fuse after programming to prevent just that.I have yet to see a commercial product where the code protection has not been enabled.

author: Kjelt
author_rank: Super Contributor
timestamp: November 20, 2013, 09:21:57 am
content: Ok thanks all! I will ask the Pickit2 from the colleague since I don't have a PC with parallel port anymore.Quote from: kayvee on November 20, 2013, 08:48:52 amYou're probably right, but I just have to check it out, there is always a (small) chance.
Lattice ispDOWNLOAD cable... just a FX2 - Page 1
Forum section: electronics / general

author: marshallh
author_rank: Unknown
timestamp: November 15, 2013, 07:43:24 pm
content: This is what $179 gets youHW-USBN-2AClick for full size -http://imageshack.us/a/img89/9992/mr8q.jpgJust a fx2 and output buffers. heh

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 17, 2013, 08:10:25 pm
content: Dump the EEPROM

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: November 17, 2013, 08:27:27 pm
content: You can buy a Chinese box that emulates Xilinx Altera and Lattice ISP boxes - I got one recently but not tried it yet.One word of warning on the original Lattice one - I've found it to be flaky, and have always needed to add 47-100pf capacitance between TCK and ground, near the device. I've seen this on 3 different Lattice device families

author: marshallh
author_rank: Unknown
timestamp: November 17, 2013, 08:44:48 pm
content: Thanks for the tip. I found on Altera devices that a strong pulldown is necessary on TCK - they originally recommended 10K which is not enough. I used 1K and all was well - a few months later their handbooks changed to that value. Before the clock was swinging all over the place when scoping.Lattice recommends 4.7k on all jtag resistors (4.7k pulldown on TCK).I also have one of those chinese 3-in-1 progrmamers like you mentioned. It failed to work properly, it also has a FX2 inside it with a Xilinx cpld and Lattice cpld. Pics if anyone is interested.
Reading out an ADC (ADS8325IBDGKD) with Arduino (ECG monitor) - Page 1
Forum section: electronics / general

author: NikWing
author_rank: Regular Contributor
timestamp: December 14, 2013, 03:02:52 pm
content: Hello allI'm playing around with an ECG shield for Arduino.I made this myself using schematics from a magazine and some schematics I found online.It's kinda split into 2 parts: analog part using OpAmps and optocouplers to decouple it from earth/ground/USB and the ADC part.The ADC I use is the ADS8325IBDGKD.The ECG/analog part doesn't work as it should yet at some point, but I'm trying to figure out why (maybe I'll ask about that later, lol).Right now I want to get the ADC part to work. I want to measure the analog voltage as fast as possible and then send it via serial connection to the PC to make it visible on screenFor this I have to write a little program (using vb.net) to get something like an oscilloscope on screen (either roll mode or updating the screen from left to right)But what I don't know is how to configure the ADC.I think the Arduino doesn't have to do much beside reading out the ADC value and sending it along with a time value to the serial portThe time value could be something like millis(), no idea yet if that's a good way to do it :/But how do I read out the ADC?I'm a total noob when it comes to reading out sensors. The only thing I did before was reading out DS18B20 temperature sensors using sketches from the www.So I also have real problems reading the timing information charts in the datasheetBut I want to learn how it worksThe ADC is controlled with 3 pins, DCLOCK (determines conversion speed and syncs the data transfer), /CS_SHDN (chipselect and shutdown mode) and Dout (serial output data word)Maybe someone has the time to help me out?Thanks in advance!NikIf schematics are needed, I'll post them

author: dannyf
author_rank: Super Contributor
timestamp: December 14, 2013, 03:09:45 pm
content: QuoteRead the adc's datasheet.

author: NikWing
author_rank: Regular Contributor
timestamp: December 14, 2013, 03:18:39 pm
content: Quote from: NikWing on December 14, 2013, 03:02:52 pmthank you for understanding -_-;I see something like setting /CS_shdn low with DCLOCK, cycling DCLOCK 10 times until Dout throws out the 16 bits data and for some reason Dout has 3 statesand after bit 16 I set /CS_shdn high for 5 cycles and then low again and now I have one value read out, wherever it wentNow you see what I meant with the quote above ...I wish I would find similar projects on the www so I wouldn't have to ask here.
Binachip and MIMOSYS - Page 1
Forum section: electronics / general

author: nkavv
author_rank: Newbie
timestamp: November 25, 2013, 04:41:17 pm
content: Hi all,does anybody knows what happened to the Binachip and MIMOSYS companies?Binachip was a Xilinx collaborator that worked on dynamic translation of executables (I think) for behavioral synthesis.MIMOSYS was a Swiss startup working on application-specific instruction-set processor design tools focusing on application analysis for custom instruction synthesis. Maybe they supported Nios or early Nios-II and/or Microblaze. I don't recall correctly. This was around 2005 to 2007.Best regardsNikolaos Kavvadiashttp://www.nkavvadias.com
failing to run FreeRTOS example on TI Hercules Launchpad - Page 1
Forum section: electronics / general

author: jancumps
author_rank: Unknown
timestamp: November 11, 2013, 09:34:55 am
content: I have been trying to get theFreeRTOS example at HWTouristworking on a TI Hercules TMS570LS04x/03x LaunchPad.I did as explained by Eric B. , with these changes:I chose the processor on my board (TMS570LS043x) in stead of the one in the walkthrough.I unchecked the Use Malloc Failed Hook because that gave a link error (the example does not implement the handler code for this option). I'm not expecting an error because of that because it's mem allocating related.When I step through my code in a debugger I can walk up to the line: vTaskStartScheduler() .As soon as I step over that one, it goes of forever (that might be expected, don't know about that yet) but doesn't log results via SCI as expected from the code. The SCI part works. I do get the initial "SCI Initialsed." message in my terminal.I tried inserting a taskYIELD() in the vReceiverTask loop out of desparation but that didn't yield (sic) anything.Anyone got more success?

author: jancumps
author_rank: Unknown
timestamp: November 13, 2013, 04:24:33 pm
content: Lavanya K. pointed out on YouTube (Lavanya must have a g+ account) that the "use Timers" option should be unchecked in the OS tab of HALCoGen.I tried that, and it worked. Cool.