Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Arcsech
Aug 5, 2008
Anybody here used Cypress PSoC? I'm working in an embedded project at an internship this summer, with a fair mix of analog and digital stuff using the PSoC 3, which is basically an 8051 with a small FPGA and some analog hardware (op amps, PGAs, and comparators come to mind, plus some really cool internal signal routing hardware) stapled on. It's pretty easy to use, not Arduino easy but more so than, say, the MSP430.

(Edit: disregarding the recent port of the Arduino stuff to MSP430, Energia)

Although once you start pushing the limits of the internal routing, wrestling with the software to get it to do what you want can be difficult and basically requires understanding the layout of said internal signal routing hardware. Fortunately, they just updated PSoC Creator to include a feature that makes this much easier.

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008

Otto Skorzeny posted:

Ahahahahahahahahhaha yes, I will regale you with tales later

I think I've seen some of your posts in the "learning electronics" thread, although I think your more detailed posts had already gone far past got buried by the time I started reading it. I'd like to hear your tales of (presumably) horror.

Arcsech
Aug 5, 2008

Martytoof posted:

re: SPI: I'm imagining something like: integrating some other IC into the SPI mix which would have, say, five or six high pins, each connected to a separate SPI slave, then in my SPI communication routine I could feed the IC a command depending on which IC I wanted to talk to, and it would bring that particular slave low for communication. I'm just talking out my rear end though.

It would require 6 total pins and you'd toggle other other ICs for a short time in the process (I'm not familiar enough with SPI to say whether that would break anything or not), but it seems like you could do this with a serial-in parallel-out shift register.

Arcsech
Aug 5, 2008

movax posted:

Totally missed it, but it does look pretty slick, and I think it'll be fine for hobbyist/etc use. The configurable blocks are pretty slick; need a ton of PWM for motor control? No problem! gently caress ton of SPI/I2C for weird reasons? Still good!

Paging Otto to this thread to rant about how the PSoC has screwed him over repeatedly (though I think he was having problems with a specific version).

I'm not Otto but I have had some experience with the PSoC line. I think this is pretty cool, although I haven't worked with the PSoC5 before, only the PSoC1 and PSoC3. PSoC3 uses the same software, and honestly I think that software is pretty darn good. It takes a little getting used to, but it's pretty well documented and once you do get used to it it's really very nice most of the time. The configurable blocks stuff works well as long as you don't try to really push the limits of what it can do - they don't provide any kind of easy to use list of internal resources in use so unless you're specifically keeping an eye on it, it'll suddenly go from hunky-dory to "Oops, I'm not gonna compile anymore and here's an obscure error message for you!" Once you get to that level, you kind of have to pull up the data sheet and get comfy with the internal silicon to optimize your design, which can be... annoying. But most hobbyists shouldn't run into that problem, I think, as the PSoC5 has a poo poo ton of internal stuff.

I've heard that the analog components in the PSoC5 aren't so hot. In the PSoC3, they were pretty good for what they were. Certainly usable, at least if you paid attention to the app notes and didn't use that fancy internal routing to shove your high-precision ADC input line through the middle of your digital logic section. Although even with the PSoC3, Cyrpess had a worrying tendency to not provide important details of their analog components - as an anecdote, the internal op-amps had something like maximum output current, input range, and approximate bandwidth provided, which is nowhere near enough information for certain uses. They ended up being really quite good op-amps, but they just didn't give any information about them in the datasheets.

On top of that, I've heard the PSoC5's analog stuff is pretty bad. I'm sure for most hobbyists it'll be fine as long as you're not expecting to get all 20 bits out of that ADC, for example. It'll be fantastic for digital stuff though at least, I'll probably pick one up at some point.

Arcsech
Aug 5, 2008

jiggerypokery posted:

Embedded programming seems a pretty hot topic for jobs in my area at the moment. Has anyone got any tips on getting some demonstratable skills in it for someone with a C++ background? In other words the kind of stuff that I should probably google myself but deserves its own "how to get into it" section in the OP?

Buy an MSP430 Launchpad or a Stellaris Lauchpad or something like that and mess around with it for a while. DO NOT use an Arduino if you're attempting to get an embedded systems job, you will be laughed at all the way to the door. Right or wrong, the Arduino has a rep for being nothing but a kid's toy but the MSP430 line are some pretty commonly used microcontrollers, and of course ARM is beefy as hell (for a uC).

Arcsech
Aug 5, 2008

Sinestro posted:

:kiddo: Is it OK if I just use them as cheap, ubiquitous AVR dev boards with a bootloader on them, but skip the libraries?

Yes, just don't show the Arduino itself in any pictures you put in a portfolio - stick it in a breadboard or something. I just know a lot of engineers who see the people who blink an LED, then claim they're masters of everything embedded and associate that attitude with the Arduino.

I still think the MSP430 Launchpad is generally better though - easy to use, ultra-cheap at $5, and a very, very commonly used uC.

Arcsech
Aug 5, 2008
Anybody have an "Complete Idiot's Guide to Interrupts on the Stellaris Launchpad"? Because I've been beating my head against the wall with this drat thing.

All I want it to do is turn on the loving LED when I press the button, and I want it to do it with an interrupt. But it never hits the breakpoint I set at the start of the ISR. The example code they have with timer PWMs isn't really all that helpful.

Arcsech
Aug 5, 2008

Martytoof posted:

Is your ISR defined in the startup_xyz_something.c file?

Yeah. I should have put more detail, I was just very tired and frustrated when I made my last post.

I have this keypad: https://www.adafruit.com/products/419

And I'm trying to make it work with interrupts. I wrote some code to poll it and modified it, so it's not the best or most efficient code, this is just me screwing around, but here's all the relevant code:

[edited out-I'm dumb]

Edit: I just missed that you need to enable interrupts after registering your interrupt handler.

Arcsech fucked around with this message at 10:06 on Feb 3, 2013

Arcsech
Aug 5, 2008

Cancelbot posted:

This looks too good to be true to me:
http://www.sainsmart.com/new-nxp-arm-cortex-m3-lpc1768-development-board-3-2-tft-lcd-module-64kb-sram.html

As does this (less so)
http://www.sainsmart.com/arduino-co...-atmega8u2.html

Is it sme sort of scam? I'm after a small CPU/display combo to toy around with and most kits seem vastly more expensive.

They probably have poo poo quality control and nonexistant English documentation, but they'll probably work fine. The latter has been my big problem with cheap parts, especially screens, ordered from China. If they come with drivers for your uC then great, but unless you're fluent in technical Chinese, pray you never have to modify it or write your own.

Arcsech
Aug 5, 2008

Rocko Bonaparte posted:

This isn't about embedded programming per-se, but I have a question about analog-digital converters for regular PCs. Specifically, what are some good ones out there? I see a few and can't really make up my mind. I was hoping to find something in the short term that takes a signal from the range of 0-5V, samples it very rapidly, like > 10Hz, and has > 8bit precision. Has anybody worked with anything like this before for situations like this?

At 0V-5V, 8-bit, and 10Hz, your easiest cheap solution is probably to just buy an Arduino and have it send the ADC reading over serial 10 times per second.

Arcsech
Aug 5, 2008
Texas Instruments' chips that are easily available to hobbyists, the Tiva C Series (formerly Stellaris LM4F) and MSP430 are pretty nice pieces of hardware.

Code Composer Studio is a terrible piece of poo poo.

Arcsech
Aug 5, 2008

Captain Capacitor posted:

Why is everything about the Beaglebone so terribly documented, or at least terribly assumptive.

It's made (and therefore presumably documented by) Texas Instruments.

All their documentation is like that.

Arcsech
Aug 5, 2008

Delta-Wye posted:

Their MSP430 stuff is good, and I've found their general IC stuff is okay. Their DSP and ARM documentation is not as nice in my experience.

Yeah, that's the stuff I've been working with lately. The general IC stuff varies a lot based on which IC it is. Their StellarisWare (now TivaWare) libraries are reasonably well-documented as well, at least as far as basic usage goes. The data sheet for the actual chip is pretty impenetrable though.

Arcsech
Aug 5, 2008

Krenzo posted:

I've played around with TI's Code Composer Studio with their Stellaris Cortex-M4 eval board but have not read anything about their ability to program external chips.

I recently used the TI Stellaris M4F on a custom PCB, and the Launchpad can definitely be used to program it. I'm on my phone right now but I can post a sort of how to later if you or someone else is interested.

Arcsech
Aug 5, 2008

Martytoof posted:

TI has done a fairly decent job supporting its Stellaris Launchpad product and if you're comfortable learning to use their StellarisWare API then I think it's probably as good a platform to start on as any when it comes to ARM. Plus you can always ditch the libraries and go to registers and bare metal, but I think TI is banking on you finding StellarisWare so easy to use that you just keep on using it.

StellarisWare is fairly easy to use, yeah. Now, they assumed that people would just start from their example projects, so if you want to make a new project you have to manually tell the IDE to include the StellarisWare libraries if you use their provided environment.

Also for what it's worth, it's called the Tiva C Series microcontroller, and TivaWare now.

Arcsech
Aug 5, 2008

evensevenone posted:

I kinda think that if your workflow requires that you spend a lot of time pressing F7 and watching numbers change in a watch window to figure out what your code does, you must have some pretty shoddy development practices.

For me, the debugger mostly comes out when I'm having hardware-related issues - is the data from the SPI bus actually going into the buffer correctly? Is a configuration register getting fiddled with by some vendor-provided code when I didn't expect it (the answer is always yes)? Is the right thing happening on the microcontroller but that behavior isn't reflected in what the hardware does, pointing to an issue in either my hardware or in the vendor's silicon? This is stuff that you can't easily make automated unit tests for unless you feel like simulating your hardware and all of its peripherals - and even then, your simulation would have to match reality perfectly.

And yeah a lot of this you could do by spitting it out on a UART or something, in the same way you can drive a nail with a screwdriver if you hit it hard enough.

Arcsech fucked around with this message at 22:53 on Nov 15, 2013

Arcsech
Aug 5, 2008

Slanderer posted:

Does anyone know of any good open-source embedded software that uses C++ effectively? I'm starting the design of some low-level software, and it occurred to me that outside of UI elements I haven't seen C++ used very effectively in embedded SW. Mostly I've seen instances where it is used, but to such a limited extent that C could have been more easily used instead.

This is mostly because a lot of C++ features have a fair amount of overhead associated with them, which isn't so great for embedded stuff with really tight flash and RAM limitations. Thus, C++ is usually used as "C with classes" for embedded stuff.

Arcsech
Aug 5, 2008
Holy poo poo Renesas tools suck rear end, even relative to other uC toolchains.

Arcsech
Aug 5, 2008

Arachnamus posted:

Haven't used FPGAs in years. Might be fun.

I'm comfortable with Erlang as a parallel language (roughly speaking), is it a dramatic departure even from that?

Yes. VHDL & Verilog (they're pretty similar) are hardware description languages, not programming languages. You basically have to approach them with a completely different perspective from anything that's designed to run on a processor. HDLs are a relatively high-level way of describing a logic circuit, whereas programming languages are a high-level way of describing the sequence of operations a processor should run.

Arcsech
Aug 5, 2008

more like dICK posted:

I'm looking to move from an Arduino to something a bit less "magical". Are TI MSP430's a good starting point?

I'd say so - you still get a nice dev board, but it's a good way to get started with register twiddling.

Arcsech
Aug 5, 2008

Knyteguy posted:

So a lot of the stuff being talked about is still over my head in this thread, but I was wondering about which boards may be right for me for a project I want to complete. I'm totally new to this facet of programming and especially the hardware stuff, but I'm interested.

Basically I want to run a web server from a host board (which will also talk to www), and then have client boards get instructions wirelessly from the host board's web server. I will be using sensors and physical actions on the client boards, but not the host board.

Would multiple BeagleBone Blacks be a good fit for something like this? Or maybe a BeagleBone Black for the host and something else for the clients?

Also I wish I had gotten into this sooner, because it's really cool. I played with an Arduino last night and I'm hooked.

How beefy do the clients need to be? A BBB is probably a good choice for the server, as you have enough resources that you effectively won't be limited for quite a while, but it's overkill for the endpoints if all you want to do is read a sensor or move a motor.

Basically, tell us more about the project and we'll be able to make better recommendations.

Also, yeah, it's addicting isn't it? Just be careful, next thing you know you're designing your own board and dealing with the clusterfuck that is microcontroller vendor toolchains.

Arcsech
Aug 5, 2008

Popete posted:

I asked in the Electronics thread but figured I'd throw it up here.

Does anyone know of a service that will place BGA components? I have an idea for a design using a Freescale K70, possibly with an eMMC both are BGA. I would need a service that does small (even single board) placement.

I haven't used these guys, I only found out about them just recently through OSHPark's twitter, but it seems like what you're looking for: http://www.smallbatchassembly.com/

Their FAQ posted:

Surface Mount Minimum Sizes

0603, QFNs, BGAs are OK w/minimum .5mm pitch

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008

Fusion Restaurant posted:

What's a solid open source version of Arduino Uno boards? If it's possible to get a cheaper one made by someone else, I'm planning on sticking it into a robot so I'd rather permanently lose a cheaper chip than a more expensive one.

If you're willing to order from and wait for shipping from :china: this clone from Fasttech is probably about the cheapest you'll get at $8. Might be able to get cheaper on eBay, but Fasttech is fairly reliable and you don't have to deal with eBay.

If you'd rather order from a US company, Sparkfun sells their Uno-compatible RedBoard for $20.

  • Locked thread