|
movax posted:Do you have Tx->Rx set up properly? Should be crossed over, double-check the pin-names vs. what they actually are. Some people label their pins Tx and it's actually a receiver buffer where you hook up the external Rx line to it. I literally just got it working. The example code I borrowed from was testing for some flag to be set, I figured it was never getting set, so I took out the test and now it just happily spits out characters. I'll have to watch out for that in the future though! So fwiw, the LaunchPad (MSP-EXP430G2) can be used as a UART->USB converter if there's no chip installed. Now I just need to learn how to actually use the USART for more than just sending a test string.
|
# ? Nov 30, 2012 07:42 |
|
|
# ? May 13, 2024 08:28 |
A+
|
|
# ? Nov 30, 2012 15:36 |
|
ST is giving away free STM32F3DISCOVERY boards, apparently. I have one of these and it's pretty nifty. Cortex M4, has an integrated ST-Link SWD USB interface that you can decouple from the project board and use to probe any other ST projects you might have (and apparently unofficially other vendors' Cortex MCUs, but I haven't tried yet). Link is here: http://www.st.com/internet/evalboard/product/254044.jsp You have to register on their site and give them some project you'd like to work on I guess. I just made up some project that sounded plausible. I guess we'll see if they approve the order or not. --- Also: All hail the university e-waste disposal cage! In working condition! some kinda jackal fucked around with this message at 15:58 on Nov 30, 2012 |
# ? Nov 30, 2012 15:53 |
|
Martytoof posted:ST is giving away free STM32F3DISCOVERY boards, apparently. I have one of these and it's pretty nifty. Cortex M4, has an integrated ST-Link SWD USB interface that you can decouple from the project board and use to probe any other ST projects you might have (and apparently unofficially other vendors' Cortex MCUs, but I haven't tried yet). THanks for linking this
|
# ? Nov 30, 2012 16:15 |
|
Otto Skorzeny posted:THanks for linking this No problem All credit goes to hackaday.com where I saw the link.
|
# ? Nov 30, 2012 16:16 |
|
Maybe this one will have better documentation than the STM32F0-DISCOVERY. Of course the pins are ganged so you can't stick it in a normal breadboard. Looks like it'll take a bit more work out of the box.
|
# ? Nov 30, 2012 21:16 |
|
Can anyone point to a good tutorial that will help me to understand why/how chaining shift registers together works? I totally understand how a single shift register works. I totally FAIL to understand why you can just chain them together and have control over the entire chain with just three pins. I want to try driving a handful of 7 segment displays without multiplexing, and if I can dedicate just three GPIO pins to that task then I'm actually pretty excited. I know it WILL work, but I'm not quite sure WHY it will work. Sorry if I'm using the wrong terminology, etc. I'm using the 74HC595 in this case, I think. I'm not sure if that makes a difference.
|
# ? Dec 3, 2012 07:07 |
|
Martytoof posted:Can anyone point to a good tutorial that will help me to understand why/how chaining shift registers together works? It's pretty simple though. You shift in a bit by setting the input line high or low, and then sending a clock pulse. That bit goes into the first place, and the bit that was there gets moved into the next place and so on. The last bit gets discarded if you don't do anything with it. But if you have multiple shift registers, and your chip provides an output for this last bit, then you can just hook that to the input of your next register. You feed all the chips the same clock signal and that lets the data just overflow into as many registers as you like.
|
# ? Dec 3, 2012 07:17 |
|
Ohhhhh man yeah it JUST clicked. I can't believe I was confused by this. And then since they're all using the same output enable signal that'll make updating a 7 seg LCD a breeze. Disable the output, feed the shift registers 8 more bits, register IC 1 overflows previous 8 bits to register IC 2, register IC 2 overflows its previous 8 bits into nothingness, flip the switch and the state updates. Four bits at the edge of a cliff indeed! some kinda jackal fucked around with this message at 07:34 on Dec 3, 2012 |
# ? Dec 3, 2012 07:31 |
|
You can do the same thing with ripple counters as long as you're driving common cathode displays. I made a display for my LaunchPad using 74LS393s, then immediately forgot about it once I got an HD44780 LCD. It only needed 2 wires though (increment, reset) and some patience.
|
# ? Dec 3, 2012 08:11 |
|
I understand why TI took so long in shipping my Stellaris Launchpad now. It's to give you enough time to install a loving toolchain.
|
# ? Dec 4, 2012 22:57 |
|
I just realized TI sends out free samples of chips and such, so I picked up an MSP430 chip just to say I've played with one. Cortex development seems to be going really well for me after I gave up on being different and trying to hack together a custom toolchain/IDE/etc solution. I still have my Eclipse solution sitting unused but I ended up resorting to using NXP's LPCxpresso IDE (based on Red Studio) since it has built in support for the SWD for the lpcxpresso 1769 board I'm currently in love with. Also it runs natively on OSX. Currently working on an RFID pet project as a proof of concept and to familiarize myself with I2C and the ins and outs of learning embedded development. Also picked up DangerousPrototypes.com's Bus Blaster v2.5 so I can standardize the SWD/JTAG development across all my boards (bare 1768 chips, lpcxpresso 1769 board, stm32f3discovery board, freescale frdm, and my two stellaris boards which will eventually show up). Seemed like a pretty good buy for $40-something shipped, is supported by OpenOCD, and is pretty flexible in functionality. I have to say, once I got over the initial hump of looking over the 800 page user manual to figure out registers, this isn't really particularly more difficult than coding for anything else. I'm also talking about going directly to registers, so I'm not using any driver libraries which I imagine would make this nearly as easy as coding for Arduino or something. I don't claim to have any sort of extensive knowledge here yet, but it's definitely flowing a lot easier than I thought it would based on my initial headache of getting everything set up and running
|
# ? Dec 5, 2012 04:07 |
|
Martytoof posted:I just realized TI sends out free samples of chips and such, so I picked up an MSP430 chip just to say I've played with one. Don't forget to buy a LaunchPad for less than five freaking dollars shipped so you can program it, also it comes with two of the value line chips. I'm guessing you might have some kind of programmer already though. Also be careful because a lot of the lowest-cost MSP430s just have a wimpy serial interface that only does SPI and I2C, so make sure it has UART/USCI if that's important to you.
|
# ? Dec 5, 2012 04:18 |
|
Oh yeah I literally don't care much about the MSP, but I figured I'd breadboard it up and throw some code at it if I could figure it out given some spare time. Thanks for the info anyway though. I suppose if it really came down to it I could add some sort of UART->SPI bridge or just spend the five bucks for a better chip I've still got two Launchpads on order from TI but they're not listed to ship until the 17th. My paypal authorization that I gave TI long since expired so I don't even know if they're going to process the order or anything. If they don't then I'm honestly not going to be too beat up over it. I'll just buy a few lpcxpresso boards instead. I'm not doing any DSP stuff that the M4 would excel at. Hell, I'm dead certain that all the core I'll write in the next year could comfortably run on some bargain basement AVR or something. M3 is probably overkill for what I'm doing, but I'm doing it more for the experience than the technical specs of the chip
|
# ? Dec 5, 2012 04:45 |
|
what's my best bet for some dead simple data storage to interface with msp430, on the order of a couple mega bytes of data?
|
# ? Dec 7, 2012 23:46 |
|
peepsalot posted:what's my best bet for some dead simple data storage to interface with msp430, on the order of a couple mega bytes of data? There are a bunch of memory chips in that size range that you can talk to via SPI or I2C pretty easily. Whether it's best to go with EEPROM or flash or FRAM boils down to your requirements for write endurance, speed, cost etc
|
# ? Dec 8, 2012 00:23 |
I'm trying to use a teensy 3 with the fastspi library to drive some LED strips, but I'm not sure which pins on the teensy I should be using for the two signal lines (data and clock.) Possibly I'm just being daft, or not reading very well tonight, but so far, my goo-fu seems to be lacking. Anyone got any hints? http://www.pjrc.com/teensy/pinout.html http://code.google.com/p/fastspi/ e: Oh poo poo, I really am being daft. It's 19 for clock and 18 for data, isn't it?
|
|
# ? Dec 10, 2012 04:17 |
|
Man, that teensy 3 looks really nice after messing with msp430 launchpad these past few weeks. It has as much RAM as I have flash memory on this stupid thing. 512B RAM makes it the biggest pain in the rear end to try to read from SD card, especially since I can't find a non-SDHC card, and you can't do a partial read on a SDHC card. You have to read 512B at a time, and throw away half or more of the data since it won't fit. I think I might have to try playing with that next after I wrap up my current project.
|
# ? Dec 10, 2012 05:18 |
Yeah, I hopped on the teensy boat with the 2.0++, then somehow missed the 3.0 kickstarter, but bought a pinless one as soon as I found out they existed (because the pinned ones weren't in stock.) Finally got some header pins soldered on mine today, so far seems to be working great. The only thing that caught me off guard was that I spaced on it being USB micro rather than USB mini like its predecessors, so I had to wait a couple days on a cable from monoprice. Be advised, you'll want to go here for the latest teensy-compatible arduino dev environment, since it's still in beta at the moment: http://forum.pjrc.com/forums/6-Announcements e: I'm double-dumb tonight, it's those green pins on the pinout I want for my SPI stuff I think. I'm just having all kinds of brain farts tonight. ee: Ah HA! Got it. Pin 13 and pin 11. I don't know why that was so hard. :P Bad Munki fucked around with this message at 05:47 on Dec 10, 2012 |
|
# ? Dec 10, 2012 05:22 |
|
-
SeXTcube fucked around with this message at 21:20 on Mar 11, 2014 |
# ? Dec 10, 2012 05:40 |
|
Are you guys using the Teensy 3 with its own Arduino-like thing or are you using it with a standard ARM toolchain? I'm having a lot of fun working with my lpcxpresso board but the teensy looks hella tiny and fun too. The only downside is that I love debugging on chip so while I assume you can just break out the JTAG/SWD pins and run openocd, I'm not sure how that fits into the Arduino stack. Unless I just have it back-asswards. There's not a lot of info on the Teensy 3 development toolchain compared to their AVR product.
|
# ? Dec 10, 2012 06:03 |
I use the arduino environment. The goal of the project is for it to be a drop-in replacement for the arduino, and run as an add-on to the arduino environment. It does pretty well at that, imho. Of course, as is true with an arduino, nothing's stopping you from hacking it up however you like, as long as you have the know-how.
|
|
# ? Dec 10, 2012 06:08 |
|
Can someone help me understand how to choose a prescaler for a timer? I'm uncomfortably fuzzy on the whole concept. Why would I prescale a timer if I can have it run at a 1:1 peripheral clock? Is it just to cut down on processing time? Also if you want to count to X and you have a prescaler set to 1:2 or something, would you count to X/2 or still X and the counter would just increment itself by a scale of 1:2 every time? This is probably a really dumb question that's answered in my LPC user manual but right now I'm not seeing it. some kinda jackal fucked around with this message at 05:21 on Dec 11, 2012 |
# ? Dec 11, 2012 05:19 |
|
Martytoof posted:Can someone help me understand how to choose a prescaler for a timer?
|
# ? Dec 11, 2012 05:38 |
|
Oh I hadn't even thought of that issue. That alone makes prescalers more sensible. Thanks!
|
# ? Dec 11, 2012 05:48 |
|
Martytoof posted:Oh I hadn't even thought of that issue. That alone makes prescalers more sensible. Thanks! There is a short series of AVR articles on hackaday which made prescalers "click" for me. The discussion of the timer/prescaler code is applicable to other chips as well. (There is a bunch of other useful info in the series, and I am just getting into this, so it was valuable to me to read the whole thing.) If you want to read the prescaler bit: It is in the 3rd article in the series (here). Search for "Setting up the clock for use with interrupts" and read through his discussion of what the code is doing. He covers the prescaler configuration in nice detail.
|
# ? Dec 11, 2012 14:05 |
|
Martytoof posted:Oh I hadn't even thought of that issue. That alone makes prescalers more sensible. Thanks! They can also be quite useful for making the counter / period values be in a certain unit (eg at 84mhz a prescaler of 84 means the counter will be in microseconds). We've got one of the 32 bit timers constantly running at this rate so the counter register can be directly used as a source for timestamps, and it avoids the overhead of having interrupts trigger to update variables. It can also be easier to understand a timer with a period of 1000 to trigger every millisecond instead of a period of 840000.
|
# ? Dec 11, 2012 15:10 |
|
If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that? I just mean like a lifelike bell "*ding*" sound, not an mp3 or ringtone or anything like that so I think a full on SD card MP3 player circuit would be way overkill.
|
# ? Dec 13, 2012 21:53 |
|
Martytoof posted:If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that?
|
# ? Dec 13, 2012 21:58 |
Yeah, just easing in and easing out your plain old waveform will do wonders for softening a tone. For a sort of "ding" sound ease in over, like, 1/10th of a second, and ease out using a log function for however long you want.
|
|
# ? Dec 13, 2012 22:00 |
|
I was going to try to convert this to C: http://hlt.media.mit.edu/?p=1963 But I think I'm going to go with your guys' suggestions of easing out of the waveform. I'm pretty sure I was overthinking the solution when this will likely make it sound less lovely in no time. Thanks! I'm also not married to *ding*, it's just a neat sound my old Tektronix scope made and I thought it sounded really nice and alerted well without being SHRILL. If I can make a tone that doesn't make me want to cringe I think I'll consider it mission accomplished some kinda jackal fucked around with this message at 22:07 on Dec 13, 2012 |
# ? Dec 13, 2012 22:04 |
|
Martytoof posted:If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that? There are also ICs for this sort of thing, although I will add the disclaimer that I have never used them. Something like this maybe?
|
# ? Dec 13, 2012 22:05 |
|
armorer posted:There are also ICs for this sort of thing, although I will add the disclaimer that I have never used them. Something like this maybe? I love reading about new ICs so I'll definitely check these out too, thanks!
|
# ? Dec 13, 2012 22:06 |
|
Martytoof posted:If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that? Suppose you go back to the analog world for a second, where the circuit below produces a Vout signal like the one shown in the plot when the voltage source is a step function at t=0: That output looks like a bell ringing at about 700Hz and decaying over about one second. You could apply that voltage to your speakers to get a 'natural' bell sound. To get that signal output without needing any analog circuitry you can write down the analog circuit equations to solve for Vout in the time domain, then use the discrete step approximations of the time derivatives to get a step-update equation that looks like (*handwaves away a page of algebra*): vp = (2*v0 - vn) + (vn - v0)*(dt/(R*C)) - (v0*dt*dt/L*C));; where vp is the current value of Vout, v0 is the value Vout had on the last iteration, vn is the value Vout had two iterations ago, and dt is the time between iterations. That probabally looks like a mess, but the code comes out to be pretty simple: C# code:
You can mess with the initial value of vp, and the values of R,L,C, and dt to manipulate the sound pitch and decay duration.
|
# ? Dec 16, 2012 22:51 |
|
Did anyone here get in on the FreeSoC Kickstarter? It was funded a few months ago but I missed it. Actually I think I saw a link to it during the campaign, but didn't actually understand what it was at that point and just groaned about there being another arduino clone. This thing looks pretty drat cool though. Basically this Cypress PSoC chip that it's based around has a bunch of super configurable peripherals where you can chain together all these things like analog mux, opamp buffers, DACs, etc, just from their snazzy free(of cost) dev tools. So you can customize the chip for whatever purpose you want. I think I'm gonna have to pre-order one from their store even though the kickstarter rewards aren't scheduled to ship till Jan. Tech Specs posted:CPU
|
# ? Dec 18, 2012 22:27 |
|
I got my Stellaris finally. Ugh, the thing uses a loving Micro-USB connector. Now I need to have one of those handy. I'm thinking about replacing it myself with a mini-A port but I know I'd probably just gently caress up the board.
|
# ? Dec 18, 2012 22:30 |
|
peepsalot posted:Did anyone here get in on the FreeSoC Kickstarter? It was funded a few months ago but I missed it. Actually I think I saw a link to it during the campaign, but didn't actually understand what it was at that point and just groaned about there being another arduino clone. 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).
|
# ? Dec 18, 2012 22:36 |
|
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! I'm kinda dreaming right now of turning one of these into a automotive engine controller.
|
# ? Dec 18, 2012 22:42 |
|
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! 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.
|
# ? Dec 18, 2012 23:08 |
|
|
# ? May 13, 2024 08:28 |
|
Martytoof posted:I got my Stellaris finally. Ugh, the thing uses a loving Micro-USB connector. Now I need to have one of those handy. Mine came with a micro-USB cable.
|
# ? Dec 19, 2012 00:19 |