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
Sir_Substance
Dec 13, 2013

ante posted:

Are you going to release code?

I can't think of a way of responding to this which won't sharply derail the thread, so I'll give the short answer and people can PM me if they want more details. SHort answer is no, there will be no public release from me.

Adbot
ADBOT LOVES YOU

TwystNeko
Dec 25, 2004

*ya~~wn*
So, I'm working on an updated version of my helmet, putting a 7x32 RGB matrix into it. I've upgraded to a Mega 2560, and have a touchscreen TFT on it. So far, so good.

I'm trying to convert some of the Adafruit code, in their "cyber falls" project. I have it working, but for some reason, after 15 - 20 drops, it just stops working, and I can't figure it out.

I'm using the FastLED library, with a "frame-driven" layout for speed.

the code is here: http://pastebin.com/MCbSnggY

Can you see any obvious issues that would make it just ... stop? I can switch out of the routine, to a different pattern, but it never works again after it stops.

Edit: original code is here: http://learn.adafruit.com/neopixel-cyber-falls/the-code

TwystNeko fucked around with this message at 23:54 on Feb 27, 2014

Sir_Substance
Dec 13, 2013

TwystNeko posted:

So, I'm working on an updated version of my helmet, putting a 7x32 RGB matrix into it. I've upgraded to a Mega 2560, and have a touchscreen TFT on it. So far, so good.

*snip*

Can you see any obvious issues that would make it just ... stop? I can switch out of the routine, to a different pattern, but it never works again after it stops.

Edit: original code is here: http://learn.adafruit.com/neopixel-cyber-falls/the-code

I don't pretend to understand the code, having taken all of a 6 second look at it, but I found this in the opening paragraph of the original site:

One of the major changes is the use of a timer interrupt, so the animation speed is consistent and smooth regardless of the current activity level. Setting up the timers involves accessing hardware registers directly, and as a result this code will work only on the Trinket. Changing this around for other boards requires some pretty deep programming skill.

Is the bolded bit relevant?

TwystNeko
Dec 25, 2004

*ya~~wn*
Not really, since I'm not using a timer interrupt. I'm just calling drawRaindrops() in the main loop every 10ms or so via the nextFrame var.

I suspect it has to do with their code for removing a drop from the list. I know why they have to do it, it's basically a memory leak, since it's keeping track of multiple, simultaneous items. I just don't know a better way to do that.

TwystNeko fucked around with this message at 02:03 on Feb 28, 2014

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

Sulla Faex
May 14, 2010

No man ever did me so much good, or enemy so much harm, but I repaid him with ENDLESS SHITPOSTING
Does anybody know any good resources for buying this stuff online in Europe, or even Italy? I'm on ebay.it and amazon.it and the prices are wildly different to what the OP suggests which I imagine could be due to the 'hobbyist' perception factor that vendors might have.

I'm looking for just some low-cost starter stuff like the Ti Launchpad or maybe the STM32.

e: Just found one, this seems alright: https://www.distrelec.it/circuiti-digitali-strumenti-di-sviluppo-quarzi/componenti-attivi

I'll have to do some research into what I need to start (Cables, LED screens etc) and what the boards can support.

Sulla Faex fucked around with this message at 10:29 on Feb 28, 2014

Jaded Burnout
Jul 10, 2004


I'm looking to put together a prototype wireless HDMI system and I'm wondering what sort of hardware I should be looking at.

HDMI (particularly 1.4) is an absolute shedload of data (around 10Gbit/s) but I don't need to actually process it into frames, just enough power to be able to compress it, probably encrypt it, and then transmit across a ~50m distance, then reverse the process on the other end.

One of the only requirements is latency, we're talking tens of milliseconds maximum, though any device used would need to support (and ideally come with) an HDMI port that can be used for input or output.

I typically work with full-scale servers so I have absolutely no idea on the scale of modern microprocessors vs the task at hand. Any advice would be great, thanks.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I'd look into FPGAs. They're good at exactly what you need, i.e. taking data into, performing a set series of operations, and dumping it out very fast.


VHDL, the language you'd likely be using is a fully parallel language, which will be a huge paradigm change for you. But it's kinda fun.

Jaded Burnout
Jul 10, 2004


ante posted:

I'd look into FPGAs. They're good at exactly what you need, i.e. taking data into, performing a set series of operations, and dumping it out very fast.

VHDL, the language you'd likely be using is a fully parallel language, which will be a huge paradigm change for you. But it's kinda fun.

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?

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.

Slanderer
May 6, 2007

Arachnamus posted:

I'm looking to put together a prototype wireless HDMI system and I'm wondering what sort of hardware I should be looking at.

HDMI (particularly 1.4) is an absolute shedload of data (around 10Gbit/s) but I don't need to actually process it into frames, just enough power to be able to compress it, probably encrypt it, and then transmit across a ~50m distance, then reverse the process on the other end.

One of the only requirements is latency, we're talking tens of milliseconds maximum, though any device used would need to support (and ideally come with) an HDMI port that can be used for input or output.

I typically work with full-scale servers so I have absolutely no idea on the scale of modern microprocessors vs the task at hand. Any advice would be great, thanks.

Is this just for "fun", or for work stuff? Because this sounds terrificly difficult. Very few wireless HDMI products seem to boast a 50m range, and even those that do imply that it is a probably a theoretical limit that you will never reach if there is a wall in the way / a wall near by to reflect off and add multipath / any other devices in the same frequency band. My gut tells me that there may be technical issues to achieving that sort of range reliably while following FCC regulations, depending on what band you're using.

Or, dumb idea: if there is any chance your wireless receiver is stationary, you could use a commercial solution and swap out the built in antennas with directional ones. Of course that still isn't kosher from a regulatory standpoint either, it's certainly a lot easier.

Jaded Burnout
Jul 10, 2004


Slanderer posted:

Is this just for "fun", or for work stuff? Because this sounds terrificly difficult. Very few wireless HDMI products seem to boast a 50m range, and even those that do imply that it is a probably a theoretical limit that you will never reach if there is a wall in the way / a wall near by to reflect off and add multipath / any other devices in the same frequency band. My gut tells me that there may be technical issues to achieving that sort of range reliably while following FCC regulations, depending on what band you're using.

Or, dumb idea: if there is any chance your wireless receiver is stationary, you could use a commercial solution and swap out the built in antennas with directional ones. Of course that still isn't kosher from a regulatory standpoint either, it's certainly a lot easier.

It's a speculative work thing. The 50m range is as you say a theoretical line-of-sight limit, it's by no means the most important part of the spec, compared to the latency. A more realistic range is 5 to 10m indoor, 20m outdoor.

Slanderer
May 6, 2007

Arachnamus posted:

It's a speculative work thing. The 50m range is as you say a theoretical line-of-sight limit, it's by no means the most important part of the spec, compared to the latency. A more realistic range is 5 to 10m indoor, 20m outdoor.

Ah, that makes it a bit better, then. It looks like professional grade transmitters also advertise that sort of range and latency:
http://www.idxtek.com/products/cw-1

carticket
Jun 28, 2005

white and gold.

I have learned far too much about DDR memory and the signalling used over the past two weeks than I ever wanted to know. The current result of all this work and research is this: Never be the first customer. Not only are there a million barely documented knobs to turn in software, but you've got silicon that may or may not work regardless of all the knobs.

movax
Aug 30, 2008

Mr. Powers posted:

I have learned far too much about DDR memory and the signalling used over the past two weeks than I ever wanted to know. The current result of all this work and research is this: Never be the first customer. Not only are there a million barely documented knobs to turn in software, but you've got silicon that may or may not work regardless of all the knobs.

Hahah, you poor bastard. Which vendor's controller?

carticket
Jun 28, 2005

white and gold.

movax posted:

Hahah, you poor bastard. Which vendor's controller?

Microsemi.

movax
Aug 30, 2008

Mr. Powers posted:

Microsemi.

:downs:

ProASIC3 or IGLOO2?

JawnV6
Jul 4, 2004

So hot ...
Does PSoC Designer have any hotkeys, specifically "jump to definition"? I'm looking through someone else's code and keep banging F3/F12 to no avail. At this point I'd take a goofy alt-shift-meta combo to jump to where something's defined, but it's not even in the right click context menu.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Crossposting from electronics thread because I just realised this is even more relevant here

ante posted:

HEY GUYS!
Element14 just emailed me saying that they like my blog and if I give them a shoutout, they'll send me $75 worth of swag. What should I get?
I'm thinking an FPGA, but I don't know what $75 will get me.

I have no intention of telling them that they're the only hits I've had on my blog all week (it is mostly for documenting my own personal projects and I haven't really advertised it other than for potential employers).


Also I've been unemployed for too long. Somebody in Vancouver hire me please.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

JawnV6 posted:

Does PSoC Designer have any hotkeys, specifically "jump to definition"? I'm looking through someone else's code and keep banging F3/F12 to no avail. At this point I'd take a goofy alt-shift-meta combo to jump to where something's defined, but it's not even in the right click context menu.

I don't know much about PSoC Designer (that's the IDE for PSoC 1 devices, right?), but PSoC Creator (for the higher end PSoC 3 and 5 devices) lacks it and it infuriates me. The go-to app engineer at Cypress for these sort of questions is Matt Landrum - he emailed me a week ago about a major update to PSoC Creator that's coming that's supposed to address some of its many deficiencies, maybe Designer is getting a facelift too?

carticket
Jun 28, 2005

white and gold.

movax posted:

:downs:

ProASIC3 or IGLOO2?

SmartFusion 2. Same controller as the Igloo, but without the ARM core disabled. Allegedly this is the same die as the other packages, but there's the possibility that DM[2:3] are brought out in place of DM[0:1]. It's the only reason I can think it's so screwed up.

minidracula
Dec 22, 2007

boo woo boo

Mr. Powers posted:

SmartFusion 2. Same controller as the Igloo, but without the ARM core disabled. Allegedly this is the same die as the other packages, but there's the possibility that DM[2:3] are brought out in place of DM[0:1]. It's the only reason I can think it's so screwed up.
I guess it's reasons like this I still end up sitting in conversations with national labs and their partners where someone will mention offhandedly that the reason Group X's NSF-funded research project is going with Vendor Y's Part Z is just because Memory Controllers Are Hard (and said Part Z has one already, despite it probably not being what they would want/need for their project if they got to do their own).

I mean, I don't intend to make it sound like they are trivial or anything, that's totally not the case (ask me how I know). But still.

movax
Aug 30, 2008

Mr. Powers posted:

SmartFusion 2. Same controller as the Igloo, but without the ARM core disabled. Allegedly this is the same die as the other packages, but there's the possibility that DM[2:3] are brought out in place of DM[0:1]. It's the only reason I can think it's so screwed up.

:stare: Fuuuck. I've always been curious how well they manage/control their die + package combinations, considering how in-depth the IGLOO guides can get (Die A with elements B in package C does D and F, but A + B in Package G does E and F...).


minidracula posted:

I guess it's reasons like this I still end up sitting in conversations with national labs and their partners where someone will mention offhandedly that the reason Group X's NSF-funded research project is going with Vendor Y's Part Z is just because Memory Controllers Are Hard (and said Part Z has one already, despite it probably not being what they would want/need for their project if they got to do their own).

I mean, I don't intend to make it sound like they are trivial or anything, that's totally not the case (ask me how I know). But still.

I think it's why a lot of people decide to roll their own. I'd say it works less than half the time though; the other portion think they've outperformed the manufacturer / commercially available cores, but then act confused when they start hitting corner cases and realize that maybe there's something to validation after-all...

Manufacturer package issues aside, I think some folks screw up their layout too, be it loving up controlled impedance or simply not following length-matching rules/restrictions.

JawnV6
Jul 4, 2004

So hot ...

Otto Skorzeny posted:

I don't know much about PSoC Designer (that's the IDE for PSoC 1 devices, right?), but PSoC Creator (for the higher end PSoC 3 and 5 devices) lacks it and it infuriates me. The go-to app engineer at Cypress for these sort of questions is Matt Landrum - he emailed me a week ago about a major update to PSoC Creator that's coming that's supposed to address some of its many deficiencies, maybe Designer is getting a facelift too?

I dunno, I got roped into looking at some source to help our EE's out. PSoC Designer 5.4 is what the window's calling itself, I thought it was a PSoC 3 I was looking at. Thought it was just buried away, thanks for the dismal confirmation.

carticket
Jun 28, 2005

white and gold.

It seems I have to back track on my complaints earlier. It is very likely our board design and not Microsemi's fault in any way. Their documentation is still terrible, with the DDR controller documentation split across at least the files, and still missing bits.

Rescue Toaster
Mar 13, 2003
Can I just say that texas instruments providing technical data (schematics, design files, etc...) exclusively as a self-extracting .exe that requires administrator privileges and can't be extracted with winrar/7zip is a goddamn atrocity.

Seriously, screw you TI. Examining the exe reveals it was created with a tool called 'InstallJammer'. Good job.

Rescue Toaster fucked around with this message at 02:44 on Mar 24, 2014

JawnV6
Jul 4, 2004

So hot ...

Otto Skorzeny posted:

What do folks here do for unit testing? I'd like to do more of it than I currently am

I'm looking into TI's Debug Server Scripting at the moment. Not answering your question, just curious about other's experience solving this problem with this tool.

I'm not crazy about testing embedded code with JavaScript of all things, but I've hit the point where I need to start testing some of the weird conditions this device will see and it appears to have all of the hooks I'll need to do it in the JS examples. They claim python compatibility, but without examples I'm thinking it'll be faster to modify the JS. Setting up a memory image and stubbing out the sensor data to read the values we pulled off the units live are the biggest opens at the moment.

edit: jesus, this isn't unit testing, it's automating the debugger interactions with a live target

JawnV6 fucked around with this message at 18:25 on Mar 28, 2014

Switzerland
Feb 18, 2005
Do what thou must do.
Maybe (probably) this is a dumb question, but something I've been wondering about: Is there such a thing as a drag & drop board builder? To elaborate: Say you want to create a small embedded system that has, say, an ARM chip, four USB ports, obvious stuff like a power plug, RAM, HDMI out, etc.? So you just drag & drop the various chips and connections, and it provides you with the schematics, ready to have it made?

OctaviusBeaver
Apr 30, 2009

Say what now?

Switzerland posted:

Maybe (probably) this is a dumb question, but something I've been wondering about : Is there such a thing as a drag & drop board builder? To elaborate: Say you want to create a small embedded system that has, say, an ARM chip, four USB ports, obvious stuff like a power plug, RAM, HDMI out, etc.? So you just drag & drop the various chips and connections, and it provides you with the schematics, ready to have it made?

I'm sure there are plenty of dev boards that would have that, maybe with two usb ports instead of four. You could take something open source that has most of what you need (Beaglebone Black maybe) and modify it.

Switzerland
Feb 18, 2005
Do what thou must do.

OctaviusBeaver posted:

I'm sure there are plenty of dev boards that would have that, maybe with two usb ports instead of four. You could take something open source that has most of what you need (Beaglebone Black maybe) and modify it.
I meant more like in software, e.g. you have a list of CPUs, ports, I/O, etc., and the software figures out how to interconnect all of that. Also, I have no idea how easy or hard that would be.

OctaviusBeaver
Apr 30, 2009

Say what now?

Switzerland posted:

I meant more like in software, e.g. you have a list of CPUs, ports, I/O, etc., and the software figures out how to interconnect all of that.

I've never heard of anything that will automatically tell you e.g. what ports you need to connect from your USB port to the microcontroller and then make the gerber files for you to have a board built.

quote:

Also, I have no idea how easy or hard that would be.

Well to modify the Beaglebone Black you would download the Orcad files here:
http://beagleboard.org/hardware/design

Open them up in Orcad and make your modifications. This will involve modifying the schematic, where you place components and choose which pins/connections go where, and the layout which is the to-scale representation of how the components will be arranged on your circuit board and how the traces are routed. Then you pay some money to have your board fabricated, buy the components and solder it all together. It would probably be a pretty big job.

Are you asking out of curiosity or is there something specific you are trying to build?

Pan Et Circenses
Nov 2, 2009

Switzerland posted:

I meant more like in software, e.g. you have a list of CPUs, ports, I/O, etc., and the software figures out how to interconnect all of that. Also, I have no idea how easy or hard that would be.

No, even the really expensive EDA software out there is terrible at automatic layout. And that's not even considering that a lot of components have specific requirements on how they have to be physically laid out (e.g. power pins X, Y and Z need bypass caps within 10mm laid out just so). I've had bespoke eval boards designed for my company by some of the huge names in hardware vendors out there that were broken if you tried to do much more than turn them on because they weren't laid out just right.

Long story short, if you're using a little PIC or something running at 4MHz it's not so bad, but you want USB/HDMI/(D?)RAM/etc... and that kind of high data rate stuff very easy to mess up. For example, just take the DRAM. You're going to need to match trace lengths for all its IO pins to minimize clock skew, and even that's something EDA software is terrible at.

Sorry for the bad news :)

more like dICK
Feb 15, 2010

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

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.

armorer
Aug 6, 2012

I like metal.

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?

You could look into AVR as well, since you already have one in your Arduino.

Slanderer
May 6, 2007

armorer posted:

You could look into AVR as well, since you already have one in your Arduino.

It's super easy to get started with any of AVR device, which is why they are great. If you don't want an Atmega or Attiny, then the XMEGA line is pretty cool (for an 8bit micro with a ton of peripherals bolted onto it)

carticket
Jun 28, 2005

white and gold.

I'd suggest the STM32. They have a wide range, and if I recall correctly, the STM32L1 Discovery board (with on board debugger) runs $12.

Switzerland
Feb 18, 2005
Do what thou must do.

OctaviusBeaver posted:

Are you asking out of curiosity or is there something specific you are trying to build?

Nah, just thought it might be fun to have something like a drag-and-drop, make-your-own computer app. I kinda figured it was pretty difficult! :)

Pan Et Circenses posted:

Sorry for the bad news :)

No worries, and thank you both for answering my question!

more like dICK
Feb 15, 2010

This is inevitable.

Arcsech posted:

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

Thanks. I grabbed a MSP430 LaunchPad, and one of the Tiva C ones as well. Code Composer Studio has versions for Windows and Linux, is the Linux version up to snuff or should I be setting up a Windows vm?

Adbot
ADBOT LOVES YOU

Pan Et Circenses
Nov 2, 2009

more like dICK posted:

Thanks. I grabbed a MSP430 LaunchPad, and one of the Tiva C ones as well. Code Composer Studio has versions for Windows and Linux, is the Linux version up to snuff or should I be setting up a Windows vm?

It'll be pretty quick to find out; if you can successfully connect the over JTAG and see useful debugging information (local disassembly, for example) odds are it'll work just fine in Linux. The only reason I've had to use Windows with some (unreleased) TI products is that the JTAG drivers were Windows-only, and with that I was successful in a VM. That said, I haven't actually used the MSP430.

  • Locked thread