News for hackers. Stuff that matters.
Re:A simple I2C master implementation on the MSP430 by _b8r0 on Sunday April 23, 2017 @09:07AM (#14178003)
It's amazing how (comparatively) convoluted I2C is on platforms without the Wire library support you see on Atmel platforms.

That's not to say that such platforms are bad (MSP430 has it's advantages and disadvantages depending on what you want to do with it), but more of a testament to the Wire library.

Re:A simple I2C master implementation on the MSP430 by ctz on Sunday April 23, 2017 @09:45AM (#14178130)
It's not too surprising that a high-level I2C abstraction looks less convoluted than a register-level I2C driver.

Here's the equivalent code for the Atmel peripheral: https://github.com/arduino/Arduino/blob/master/hardware/ardu...

Re:A simple I2C master implementation on the MSP430 by bArray on Sunday April 23, 2017 @04:55AM (#14177230)
Getting a 503 error for the entire site...

Just went to find the page of internet archive:

    web.archive.org has been blocked by Sky Broadband Shield, which lets you choose the websites that can be seen in your home.
I hate ISPs. If someone could update the link, that would be grand!
Re:A simple I2C master implementation on the MSP430 by eriknstr on Sunday April 23, 2017 @06:12AM (#14177466)
Link works fine for me now. In case it stops working again, here's a snapshot hosted at another archival site: http://archive.is/cRT4A
Re:A simple I2C master implementation on the MSP430 by akoster on Sunday April 23, 2017 @05:44AM (#14177387)
Re:A simple I2C master implementation on the MSP430 by majcherek128 on Sunday April 23, 2017 @05:48AM (#14177399)
Change your DNS servers?
Re:A simple I2C master implementation on the MSP430 by gvb on Sunday April 23, 2017 @08:23AM (#14177881)
503 is "Service unavailable" where the service is related to the web server, not DNS.

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_...

Re:A simple I2C master implementation on the MSP430 by q3k on Sunday April 23, 2017 @08:37AM (#14177933)
Yes, but this is probably served by the ISP's servers, into which traffic was redirected by the ISP's dishonest DNS.

This is much easier to implement than fully intercepting every HTTP connection, and this is what most ISPs go with.

Re:A simple I2C master implementation on the MSP430 by joshvm on Sunday April 23, 2017 @11:01AM (#14178413)
Would that work? Sky Broadband Shield is a service which blocks adult content (and for some bizarre reason archive.org?) Would changing your DNS server make a difference? Your ISP should still be aware of what IP the content is coming from.
Re:A simple I2C master implementation on the MSP430 by bArray on Sunday April 23, 2017 @01:37PM (#14179225)
They actually override all DNS lookups if I remember rightly. It's not my connection, so I can't change that fact - I just think it's a naughty thing to do.

But it's a bit off topic!

Re:A simple I2C master implementation on the MSP430 by jwr on Sunday April 23, 2017 @09:34AM (#14178093)
If someone is interested in a simple and straightforward implementation of I2C on MSP430 with the USI module (the simpler serial module found on cheap low-end chips), I wrote a library a couple of years back, because I couldn't find anything I'd be happy with: https://github.com/jwr/msp430_usi_i2c

The code is also fully interrupt-driven, which is important for low-power applications.

Re:A simple I2C master implementation on the MSP430 by throwanem on Sunday April 23, 2017 @08:34AM (#14177922)
This is much cleaner than TI's reference implementation.
Re:A simple I2C master implementation on the MSP430 by jimmyswimmy on Sunday April 23, 2017 @09:28AM (#14178071)
It may be so, but it doesn't implement an interrupt solution, which is a really bad way to program a microcontroller.

Also I found these types particularly amusing. None of that code can be copy pasted without editing:

  while ((err == 0) && (nbytes > 0))
But since it doesn't support interrupts, I think not being able to copy paste this code is generally a good thing.
Re:A simple I2C master implementation on the MSP430 by throwanem on Sunday April 23, 2017 @10:06AM (#14178197)
I'd tend to agree! But for those of us totally unfamiliar with how I2C works, and barely familiar with embedded dev at all, a somewhat gentler introduction to the relevant concepts, that requires close experience with fewer priors than TI's reference example, is no bad thing to have.