HNHacker News
TopNewBestAskShowJobs

noexani

70 karma · joined October 17, 2020

submissionscomments
noexani··on MCS-48: The quest for 16-bit division on the 8-bit CPU which can’t divide
It's really interesting to see that it could be done like that, but, that pseudo code you've given me would translate to a heck of a lot of MCS-48 instructions! 16-bit subtraction in particular is really expensive. Potentially not much gain there?
noexani··on MCS-48: The quest for 16-bit division on the 8-bit CPU which can’t divide
You are correct. the conversion to Celsius * 10 is done earlier on, because it is easy to optionally perform this conversion, and it's easy to render the various formats (positive/negative/DP,no DP) of it to the 7-segment display banks.

Also worth considering that I originally had no interest in fahrenheit (I live in the UK). This was done as an extra later on. Didn't want to poo the original implementation taking fahrenheit straight off the sensors.

noexani··on MCS-48: The quest for 16-bit division on the 8-bit CPU which can’t divide
I have done some MCS-48 reverse engineering too. It's really useful to look at the snippets in that manual as you'll find them in disassembled code, making it quite a bit easier to understand.
noexani··on MCS-48: The quest for 16-bit division on the 8-bit CPU which can’t divide
I just calculated, there are 1800 possible Celsius values. in this application. That would be quite some lookup table.
noexani··on MCS-48: The quest for 16-bit division on the 8-bit CPU which can’t divide
It depends on the application. In this case a lookup table would consume quite a bit more program memory (there isn't any spare), and the division routine is needed for other tasks, so it makes sense to use it for that conversion too. Speed is not an issue.
noexani··on Building a 10BASE5 “Thick Ethernet” Network (2012)
Ah yes. Another one of those 'why the heck is my blog running so slow today' days.

It's on Hackernews (again) Are people ever going to get over this page?

noexani··on An Intel MCS-48 based dual temperature sensor
DS18B20 one-wire bus temperature sensor with old school LED 7 segment displays