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
a cyberpunk goose
May 21, 2007

at my last job I got the go ahead to get a Freescale k60 going from scratch with a minimal tool chain, so I could learn

I took the k60 programming reference and arm-none-eabi-gcc and made my own linker script and startup code that did things like initialize static variables and set up the multipurpose clock generator and stuff

it's a good learning experience that teaches you why C is kind of a mess. when you are writing code you have to think about the hardware, the linker, the syntax, and your own code domain, standard libraries that may or may not actually be doing what you think

I did a minimal amount of googling to force myself to really learn how to find answers for my weird questions

10/10 would recommend, I am now a mild embedded wizard

Adbot
ADBOT LOVES YOU

a cyberpunk goose
May 21, 2007

in my dumb opinion it's okay to waste cycles on simple applications in projects that don't need to scale or multi task much. get something done. optimize when it's time. structure your code base well so you can refactor your inefficiencies later

a cyberpunk goose
May 21, 2007

I watched highly skilled engineers lose their loving minds over optimizing the gently caress out of things we didn't even really need

I just wrote a huge rambling essay about some architecture horrors I lived through during my time in embedded but decided to summarize it as follows

"if you have too many things going on for a cooperatively multi tasked series of services to work reliably, you should drop an actual RTOS on there and move on. do not make your own."

a cyberpunk goose
May 21, 2007

kwinkles posted:

i read this and i think: faaaaaaart
just run x86 on it and be the fastest because that is how the real world works.

I was talking about software project and dependency structuring not the on die architecture :3:

a cyberpunk goose
May 21, 2007

are there x86 core MCUs that have the same kind of features as say a Kinetis K60 series? I've never looked

the Kinetis is a monster with a fuckload of peripherals and gating options for power consumption and a pretty good cross bar thing that reduces contention when peripherals are doing DMA

a cyberpunk goose
May 21, 2007

I remember losing my mind for a month trying to get USB going on a Freescale MCU, I gave up and moved onto validating other features like SDIO

a week into SDIO I figured out that I wasn't enabling the loving DMA security bit on the MMU I think it was. SHITTTTTTTTTTT but it was too late and I couldn't go back and fix it, now I don't work there and I still think about the USB that could have been

a cyberpunk goose
May 21, 2007

Tin Gang posted:

re-teaching myself microcontrollers update: I have received the texas instruments tm4c1294 launchpad and managed to program an led to blink on and off with some example code. very satisfied so far.

keep it up, soon you'll be ilghting up the skies :getin:

a cyberpunk goose
May 21, 2007

Blotto Skorzany posted:

now, program it... to love

no dont

it will only be disappointed

a cyberpunk goose
May 21, 2007

Mr Dog posted:

Write a linked-list library, then create a linked list of function pointers protected by nestable IRQ enable/disable commands.

There's your operating system. Superloops are kinda lovely to work with ime for all but the most trivial firmware projects. If you have some nontrivial reliability requirements then buying an RTOS license might be worth your while though.

If you're going to go completely ham with overlapping DMA then it might be worth pulling in a "real" embedded OS just so you can have a context-switching scheduler, continuation passing style in C is not very fun.

the last year of my life at my old job in a nutshell

the CEO's brilliant solution???

micro python (https://micropython.org/), using the generator pattern as a tasking system so that we can keep state without writing gnarly code

yes sir i was paid to make this poo poo run on a k64 and start hooking up bindings

yes i want to die

a cyberpunk goose
May 21, 2007

longview posted:

i should probably clarify that the serial data is 4800 baud and the DMA would just be for a laugh, with ~20 mips of pure integer processing power I can bit bang this no problem but i don't want to
i might still give freertos a try to see what it's like but i can definitely write this in standard C and a couple of state machines + a set of timed interrupts to handle maintenance tasks like self testing, monitoring battery status etc.

new question i guess: my serial data is synchronous, the radio interfaces handle clock recovery and sync, but i need to receive some data from a sound card (ASK) interface with no clock
UART is a no go since it's a bit-stream with no byte boundaries that it can detect

i know the baud rate, so i was thinking i'd run it to a SPI input in master mode and use 4x (or more) oversampling to resolve ambiguity when the clock edges drift together (only one bit out of four is likely to be clobbered by sampling on a transition so majority rule)

the other obvious option is to hook the input to an interrupt in the MCU and use a timer to count the on/off times and calculate each bit that way

SPI mode might be less work, and fits my hardware architecture, but i do have remappable pins so it should be possible reconfigure the pins on the fly

obviously i could also find some modem IC or add hardware to do clock recovery, but i don't want to spend too much money on this feature

E: or I could just emulate a commercial products serial interface and drop the ASK, that might be easier for everyone

repurposing SPI is a fun and attractive thing to at least try

a cyberpunk goose
May 21, 2007

Tin Gang posted:

this thing's been sitting around forever and I finally tested it. it works fine



there should be some use for it

:3: awwww

a cyberpunk goose
May 21, 2007

Jonny 290 posted:

do we need a separate surplus thread, or should i just megapost

i will clue u all in about american science + surplus, electronics goldmine, fair radio sales

megapost

a cyberpunk goose
May 21, 2007

http://www.rigolna.com/products/dig...bsyZRoCZGfw_wcB

i got this one for $300 from a coworker, at least i think it's the 100mhz one and not the 50mhz, not remembering

it has been extremely needs suiting as an intro scope, i have troubleshooted many a bus with it, it can log the data to a FAT thumb drive and do some basic FFT stuff as well

research the UIs on digital scopes before you buy em because some are REALLY bad, said coworker sold it to me because he was getting a "better" one, which has a faster sample rate and stuff, but the UI is so bad that he regretted the hell out of it

a cyberpunk goose fucked around with this message at 21:31 on Dec 24, 2014

a cyberpunk goose
May 21, 2007

Olivil posted:

If you guys buy a cheap chinese scopes (Rigol DS1054Z for instance, honestly thats quite a good scope for the price), google around and you might find some keygens to upgrade your scopes for free

like you can make your 400$ 50 MHz DS1054Z into a 830$ 100 MHz DS1104Z for free.

because they all use the same board.

i have a rigol in this series :0

a cyberpunk goose
May 21, 2007

Olivil posted:

RIGLOL

be warned that while you can "flash back" to your old software using a PC, i think you cant change back your model number (100MHz -> 50 MHz) thus voiding your warranty.

So if you care about your warranty dont upgrade your frequency

thanks for the pro tips, ill verify the model number and stuff when i get home

a cyberpunk goose
May 21, 2007

Jonny 290 posted:

i need one bad right now because we're about to build Radio Free YOSPOS and i need to troubleshoot HF RF circuits and filters

there's an extreme radio nerd in the projects thread

a cyberpunk goose
May 21, 2007

Captain Foo posted:

I really don't even know what an ossciloscope is or measures but it seems cool as hell

you hook up probes to the inputs

you connect probes to loops or conductors

you can now visually map the electrical characteristics of a conductor on a screen

you can configure trigger points when certain edges or thresholds occur, so yo ucan capture pulses of logic happening at realtime

for example you might have three bus lines, one clock, one data, one chip select

when you program the SoC to send some data, it pulls chip select low, clock/data wobble around between 3.3v and 0v (or whatever signal voltage), when it's done transmitting it puts chip select back up at 3.3

to troubleshoot the data you can set up a trigger on the chip select line going high and leave the other line just watching data, you send the data, the scope triggers on that moment in time that the chip select line changed, now you can look at what happened

a cyberpunk goose
May 21, 2007

Tin Gang posted:

imagine you're reading a circuits voltage, and simulatenously you're drawing with a pencil horizontally across a piece of graph paper at a constant speed. now while moving the pencil is moving horizontally at the constant speed, you move it vertically up or down to match how high or low the voltage is

you're an oscilloscope!

move the pencil to the left the more pain you feel, back to the right the less you feel

*hooks up electrodes*

*starts paper conveyor*

a cyberpunk goose
May 21, 2007

Bloody posted:

Oscilloscopes enable time domain visualization of electrical signals. The more you spend, the finer the time domain detail you can see. You can see both voltages and currents. Fancy models can do Fancy things, like frequency domain analysis or other complex maths.

no, gently caress

scopes are window dressing

when a cute lady comes over and sees your shelves of bench supplies and various scopes and your set of $1200 active probes and a mess of probes standing up out of test points on a board you are pretending to be debugging -- she will fall for you

a cyberpunk goose
May 21, 2007

longview posted:

when you move up to spectrum analyzers and storage scopes their clothes literally fall off right there

my scope has some storage :( no real spectrum analyzer though, beyond some basic fft bullshit

a cyberpunk goose
May 21, 2007

no wonder im single

a cyberpunk goose
May 21, 2007

eschaton posted:

surplus post would be a nice yosmas present

any opinion on halted (HSC) vs the others? thinking of heading there tomorrow to buy poo poo, not just ogle it.

Paging yosposter Raluek, paging Yosposter Raluek

please report to low level thread

a cyberpunk goose
May 21, 2007

Tin Gang posted:

can someone help me pick out a display to buy to hook up to a microcontroller? previous experience: making a single 7-segment display spell out "yourE gAy" one letter at a time.

I'm looking at stuff like this http://www.adafruit.com/products/661 http://www.adafruit.com/products/358 but I dunno what products/stores are good

I don't have any specific goal in mind I just wanna buy one and goof around with it

adafruit makes arduino libraries for all their screens as far as I know, I had a 96x64 oled that I was able to easily get bmps pushed out onto and do some sprite animations for a dumb gift

a cyberpunk goose
May 21, 2007

fritz posted:

im a mathematician who snuck into signals and hardware thru a couple of end-arounds, i don't really understand this post but i feel like i should

digital signals are defined by logic highs and lows and once you get to high rates of throughput the electrical characteristics of the traces and parasitic effects start to interfere so you must design around this and pull a lot of rabbits out of your rear end

I'm not an EE but I hope that explanation is more or less accurate

a cyberpunk goose
May 21, 2007

Olivil posted:

whats a good cheap (<200$?) function generator?

an arduino :unsmigghh:

a cyberpunk goose
May 21, 2007

Olivil posted:

please proceed i must have a spare uno somewhere

:munch:

generate wave forms, push them onto the DAC, pray the DAC characteristics aren't total poo poo

a cyberpunk goose
May 21, 2007

Jonny 290 posted:

Old Dudes:

Stop

That

a cyberpunk goose
May 21, 2007

hobbesmaster posted:

but wait, for $9.99 you get not one, but two SPI buses just pay separate shipping and handling

lol if your soc only has two spi controllers, spend the extra $0.35 get a monster

a cyberpunk goose
May 21, 2007

Jonny 290 posted:

im almost assuredly not going to buy this right now but lemme get a thumbs up/down on this one just so i can get an idea of the market



it feels about $75 high to me

$75 is the real price for that imo

a cyberpunk goose
May 21, 2007

yeah i picked up an entry level rigol and it's fine for the dumb poo poo i need to do, iirc it's the 50mhz one and someone here was saying the 100mhz and 50mhz are the same ones you can just flash it, but i think ill wait till i actually need it

added bonuses are things already mentioned, but you can get waaay fancier triggers for debugging bus logic stuff, also you can do FFT visualization if you need to

a cyberpunk goose
May 21, 2007

Bloody posted:

The only time I used a rigol it's ui was a laggy terrible piece of poo poo is that still the case

the one i have is no problem but as i've described before: i bought my entry rigol off a coworker who was upgrading to a bigger fancier rigol which has a loving awful interface

mine has no issues i can think of really. the UI gets a little cuttered when you are 2-3 layers deep in a setting but it's fine and responsive

a cyberpunk goose
May 21, 2007

look up videos of the rigol model you are interested in because there are some thorough youtube reviews of scopes

a cyberpunk goose
May 21, 2007

Sagebrush posted:

I really like the look of the rigol 2072 or whichever one is the $800 one with the fast update and density plotting to look like an analog scope

EEV blog guy says it's a great "entry level good" dso too so that's a big plus

https://www.youtube.com/watch?v=TRy755StMak

omfg its a monster

a cyberpunk goose
May 21, 2007

:allears: that waveform display rate

a cyberpunk goose
May 21, 2007

:( i really want that scope now but i am literally not smart enough to be involved in any project where i'd need something that monstrous

a cyberpunk goose
May 21, 2007


requesting this be a 3d animation with this music https://www.youtube.com/watch?v=gBqGC9sVBXY&t=51s and the skull slowly slipping out of th screen

a cyberpunk goose
May 21, 2007

Jonny 290 posted:

yeah iirc 1-wire devices leech power from the bus during downtime and their energy cap is measured in nF i think

[ASK] me about bit banging 1 wire read and writes with nothin but Texas Instrument's p. decent documentation

a cyberpunk goose
May 21, 2007

with a bit of fiddling you can keep a 1wire device dead without power draw

a cyberpunk goose
May 21, 2007

eschaton posted:

there's a lot you can kill with a bit of fiddling

i2c me :wink:

Adbot
ADBOT LOVES YOU

a cyberpunk goose
May 21, 2007

hobbesmaster posted:

i'm the spy by wire

master in slave out if you know what i mean

  • Locked thread