BCC-52 8052 based temperatur sensor & heating control

The BCC-52 was a Steve Ciarcia project published in BYTE magazine, this one became my entry into the embedded systems world. I bought it mainly because it had an onboard BASIC-52 interpreter and a battery backed RAM and real time clock chip (DS1216C battery backed RTC). Not that I was a fond BASIC programmer. I had done most hobbyist-programming in Turbo Pascal, but BASIC was definitely better than Assembler.
The basic idea was to build a heating control system. I found a temperature sensor (www.conrad.at part no 109426-29) with an serial I/F (by no means RS 232, but better then fiddling around with analog signals) and wrote a BASIC program to interface with it. This experiment showed the necessities of assembler skills becaase the signal timing of the temp sensor was too fast for the slow interpreted BASIC. What a chance to learn 8051 assembly language.
This skill was immediately reused when I hooked an 2 lines x 40 char LCD based on the H44780 controller to the parallel port of the BCC-52. Again, the driver was done in assembly langualge. This work greatly enhanced my understanding of the 8051 chip architecture and the implementation of BASIC-52.
Finally, I designed the heading control application. It grew larger and larger and me not being used to BASIC programming, it had all sorts of bugs because BASIC-52 did not a lot of checking of variable names, ..... So I decided I needed a preprocessor running on a PC which read a kind of "enhanced" BASIC source code and produced the BASIC-52 source which could be downloaded into BCC-52. This helped a lot and made the program work.
The LCD display alternated between two layouts
Display 1:


Display 2:

. TEMP ..,.C Pf .. Min ..,.C TT HH:MM
SOLL ..,.C On HH:MM Max ..,.C TT HH:MM

The most interesting project which utilized this preprocessor was a heating/air condition control system. It read the current temperature from a digital sensor which sent a funny 12 bit code every 10 seconds on serial interface. I connected this to one of the parallel ports and used an assembly subroutine to poll the timing signal from the temp sensor used it to find the data pulses prsenting the current temp reading.
The interface was an LCD and 4 pushbutton switches. The switches allowed to control time and temp settings for 6 individual periodes per day.
Due to the weired wiring of the LCD interface, I used another assembly subroutine to drive the LCD because the bit 0-7 on the parallel port corresponded to bits 4,7,5,0,6,1,2,3 on the LCD due to the connector layout. The subroutine effectively was a bit-test-and-set and did take care of the timing of the LCD.

more Info: Circuit Cella Books Volume 6 page 105

8051 assembler source code for temperature reading and LCD output
Basic-52 application source code (with extentions handled by "MyBASCOM")
Basic-52 Time and LCD handling source code (with extentions handled by "MyBASCOM")