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
big shtick energy
May 27, 2004


Sagebrush posted:

yeah but why would you

hurr yes let's take a power-constrained device that can run a single raw executable and put a whole fuckin operating system on it and then write apps in java

This except unironically because the chip fast enough to run a garbage collected language will cost 10c to make and use milliwatts

Adbot
ADBOT LOVES YOU

hobbesmaster
Jan 28, 2008

it's not insane at all on gateways

Sapozhnik
Jan 2, 2005

Nap Ghost
"the" kernel is a bit of a stretch. A savagely cut-down linux kernel running a single statically linked user space process from a ramfs linked into the kernel itself, yeah, just about. Just in case you wanted to add tens of megabytes of SRAM to your board design for absolutely no good reason.

hobbesmaster
Jan 28, 2008

yet people keep using uclinux

JawnV6
Jul 4, 2004

So hot ...
lol v5 c'mon

hobbesmaster
Jan 28, 2008

arm9s are still incredible value

Cybernetic Vermin
Apr 18, 2005

is docker actually a (sane, working, meaninful) thing? because i got roped into thinking so, then tried to deploy something docker-based, and it was a horrorshow. which might just as well be a sign that my janitoring expertise has run its course and in fact i don't have the right skillset to manage it, but somewhat egoistically i am tempted to think it is just sort of poo poo

JawnV6
Jul 4, 2004

So hot ...
don't mind me over here with my cores from this willenium

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme
I've been trying for three days to interface a MIPS CPU with a 'Bus Blaster' JTAG adapter and OpenOCD and haven't been successful. I'm not sure if I'm cut out for this embedded stuff after all :(

Asymmetric POSTer
Aug 17, 2005

meatpotato posted:

Bus Blaster

text me :gizz:

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme

uh nevermind it just started working and I don't know why it works now but didn't before. I hate that feeling.

hobbesmaster
Jan 28, 2008

JawnV6 posted:

don't mind me over here with my cores from this willenium

hey the last variant was released in 2006

but really in smaller quantities (like 1k) what else can you run full linux systems on thats less than $5.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Cybernetic Vermin posted:

is docker actually a (sane, working, meaninful) thing? because i got roped into thinking so, then tried to deploy something docker-based, and it was a horrorshow. which might just as well be a sign that my janitoring expertise has run its course and in fact i don't have the right skillset to manage it, but somewhat egoistically i am tempted to think it is just sort of poo poo

it's nice in dev but production is a horror show of incomprehensible products that are impossible to spell

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I want to upgrade the ROMs in my Amiga's SCSI card so it seems like a good time to pick up an EPROM burner but I don't know what to get. The ROMs are 27256s. Can I just buy a junky Chinese USB EPROM burner and an eraser box off eBay or what?

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

i got a TL866 from ebay. they're cheap and program everything you're likely to come across. if you shop around you can usually get a few adaptors thrown in for non-DIP chips. the software isn't a flaming pile of dogshit either, which alone puts it above 95% of programmers

Truga
May 4, 2014
Lipstick Apathy

Cybernetic Vermin posted:

is docker actually a (sane, working, meaninful) thing? because i got roped into thinking so, then tried to deploy something docker-based, and it was a horrorshow. which might just as well be a sign that my janitoring expertise has run its course and in fact i don't have the right skillset to manage it, but somewhat egoistically i am tempted to think it is just sort of poo poo

it's both, op.

docker is a shitshow, but it's the best shitshow on the market by a mile, so you'd best just learn to live with it.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Sweevo posted:

i got a TL866 from ebay. they're cheap and program everything you're likely to come across. if you shop around you can usually get a few adaptors thrown in for non-DIP chips. the software isn't a flaming pile of dogshit either, which alone puts it above 95% of programmers

man, that looks handy

thanks!

Spatial
Nov 15, 2007

some uart questions for you folks

how much accuracy is needed when matching baud rates between devices? the driver i was given uses lovely integer maths to program a fractional divider and can be off by as much as 12%.

how fast can you practically run a uart?

Bloody
Mar 3, 2013

above 3% and I start getting skeptical

a bog standard uart idk above 3 mbps and I'd start getting skeptical

if you controlled both endpoints and routing between them you could push it dramatically faster than that

Spatial
Nov 15, 2007

thanks. i fixed things up quite a bit, now the matching error ranges from 0 - 1.5% across the 0 - 3 mbps range. can't do better since the core clock limits the sampling rate.

Sagebrush
Feb 26, 2012

ah, I was just thinking about this stuff. I'm trying to use an attiny as a tachometer sensor coprocessor, which means it needs a relatively accurate clock both to do the timing and to communicate with the master microcontroller. I could just stick in a crystal but I'm trying to see if I can get sufficient accuracy and stability from the internal oscillator instead. Turns out you can write to the OSCCAL register to tweak the chip frequency, and by doing that I got it down to 8.01 MHz at 5 V, so better than 0.2%, which is accurate enough for reasonable speed UART and certainly good enough for a tachometer.

Only thing is I don't know how stable that is over time and with changes in temperature. Eventually this will go in a motorcycle, in a black box that may heat up to 110° in the sun and cool down to near freezing at times. I don't really care if the speedometer is out by a little bit ( legally, speedometer only has to be within -3%, +10% or something) but if it loses communication that would be annoying.

I suppose crystals are like $0.35 for a 10 PPM unit but you know, I like the efficiency of doing everything in one chip.

Incidentally, I was looking on digikey at crystals and there's one that is 8.000135 MHz. what would that be used in?

hifi
Jul 25, 2012

Sagebrush posted:

ah, I was just thinking about this stuff. I'm trying to use an attiny as a tachometer sensor coprocessor, which means it needs a relatively accurate clock both to do the timing and to communicate with the master microcontroller. I could just stick in a crystal but I'm trying to see if I can get sufficient accuracy and stability from the internal oscillator instead. Turns out you can write to the OSCCAL register to tweak the chip frequency, and by doing that I got it down to 8.01 MHz at 5 V, so better than 0.2%, which is accurate enough for reasonable speed UART and certainly good enough for a tachometer.

Only thing is I don't know how stable that is over time and with changes in temperature. Eventually this will go in a motorcycle, in a black box that may heat up to 110° in the sun and cool down to near freezing at times. I don't really care if the speedometer is out by a little bit ( legally, speedometer only has to be within -3%, +10% or something) but if it loses communication that would be annoying.

I suppose crystals are like $0.35 for a 10 PPM unit but you know, I like the efficiency of doing everything in one chip.

Incidentally, I was looking on digikey at crystals and there's one that is 8.000135 MHz. what would that be used in?

i dont know what you are using specifically but the first random atmel datasheet i found on digikey had a nice graph

Luigi Thirty
Apr 30, 2006

Emergency confection port.

a floating point glitch in the matrix

Sapozhnik
Jan 2, 2005

Nap Ghost

Sagebrush posted:

Incidentally, I was looking on digikey at crystals and there's one that is 8.000135 MHz. what would that be used in?

add another 8 kHz to that and I'm sure you could use it in a calculator somewhere op

JawnV6
Jul 4, 2004

So hot ...
does it have to be uart? just use i2c or spi

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
uart chat: so the theory is that when the transmitter sends a start bit, the receiver should always use that edge to resynchronize itself to the transmitter. clock skew between the two and issues on the line (eg long line = slow rise/fall times) is the limit on how many bits can now be successfully transferred

usually you're transmitting 10 bits because almost everyone uses 8N1, so the frame is 1 start bit 8 data bits 1 stop bit. if the timing difference between the two ends is 10% of a bit time, by the end of a 10 bit frame the timing error is 100% of a bit time, which is Bad

some fancier receivers might try to resynchronize every time they see an edge and will therefore still do fine (except on bit patterns that don't have enough edges!) but you can't count on that as a transmitter

take jawn's advice if you want high bit rates, at megabit rates rs232 is for chumps

Bloody
Mar 3, 2013

uart is the easiest + cheapest way to get data outta a thing into a pc at <= 3 mbps

Sapozhnik
Jan 2, 2005

Nap Ghost
spi is nice because you get framing

Bloody
Mar 3, 2013

spi is bad because it is grossly underspecified to the point of being meaningless

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

hifi posted:

i dont know what you are using specifically but the first random atmel datasheet i found on digikey had a nice graph



yeah, the problem with the internal crystal in most micros is that it drifts all over the place. you can easily trim them to <1% accuracy at a fixed temperature, but if the temperature is all over the place then so is the frequency.

some micros have an internal temperature sensor, so you can trim the crystal for various temperatures and store the results in a lookup table, then have your code periodically measure the temp and adjust OSCCAL accordingly, but it'll never be as accurate as a decent external crystal - although those do also drift with temperature just not as much.

Sweevo fucked around with this message at 19:52 on Apr 27, 2017

hobbesmaster
Jan 28, 2008

BobHoward posted:

uart chat: so the theory is that when the transmitter sends a start bit, the receiver should always use that edge to resynchronize itself to the transmitter. clock skew between the two and issues on the line (eg long line = slow rise/fall times) is the limit on how many bits can now be successfully transferred

usually you're transmitting 10 bits because almost everyone uses 8N1, so the frame is 1 start bit 8 data bits 1 stop bit. if the timing difference between the two ends is 10% of a bit time, by the end of a 10 bit frame the timing error is 100% of a bit time, which is Bad

some fancier receivers might try to resynchronize every time they see an edge and will therefore still do fine (except on bit patterns that don't have enough edges!) but you can't count on that as a transmitter

take jawn's advice if you want high bit rates, at megabit rates rs232 is for chumps

i2c is usually going to be slower than async serial though?

JawnV6
Jul 4, 2004

So hot ...

BobHoward posted:

take jawn's advice

longview
Dec 25, 2006

heh.
put in a GPS receiver and use the PPS signal to calibrate the clock, easy and no crystal required!

hobbesmaster
Jan 28, 2008

longview posted:

put in a GPS receiver and use the PPS signal to calibrate the clock, easy and no crystal required!

only $30! https://www.u-blox.com/en/product/neolea-m8t-series

Bloody
Mar 3, 2013

you can get a ocxo for $30

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

hobbesmaster posted:

i2c is usually going to be slower than async serial though?

it can go 400k quite easily although there's lots of devices that don't support fast mode

in theory you can do a megabit but device support for that is really rare ime (idk why I've implemented the hardware and it's still the same poo poo)

longview
Dec 25, 2006

heh.
i think the big deal with high speed i2c is you need a lower input threshold. might need a stronger pulldown transistor as well.

the pcf8574 is 100 khz only for example but it works at 400 khz as long as the bus capacitance is low enough/pullups are strong enough

hobbesmaster
Jan 28, 2008

BobHoward posted:

it can go 400k quite easily although there's lots of devices that don't support fast mode

in theory you can do a megabit but device support for that is really rare ime (idk why I've implemented the hardware and it's still the same poo poo)

the devices I've seen that support 1m i2c have warnings about actually doing your math on the bus capacitance and pull ups instead of haphazardly hooking it up

Sapozhnik
Jan 2, 2005

Nap Ghost
inter chip ethernet for everything imo

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

spi is bad because it is grossly underspecified to the point of being meaningless

but if you're doing your own project and control both sides of it, it's the best choice

no need for super accurate clocks, no pullup nonsense burning power, zippy af

  • Locked thread