Skip to content


Well Here’s Something that Worked!

November 6, 2015

Sometimes it feels like pulling teeth to get the olduino/z working but i did fairly well today.

The video shows the protoboard with the following loop running

void main(){

The delayms() and digitalWrite functions are crude but they are working with the hardware and josh’s monitor. The delay routine is accessing the millisecond tick count maintained by the monitor to time its delays and the digitalWrite routine is sharing a variable with the monitor’s rs232 routine to maintain the state of the port bits.

#define ON 1
#define OFF 0
unsigned char * __at(0xFFc0) scanptr;
unsigned int __at(0xFFF0) TicCnt;//josh's millisecond count 16 bits
static unsigned char bitval[]={1,2,4,8,16,32,64,128};//bit values

void delayms (unsigned int ms){
	unsigned int newms=TicCnt+ms;
	unsigned int testms=TicCnt;

void digitalWrite(unsigned char bit,unsigned char onoff){
	unsigned char bv=bitval[bit];
	if (onoff){
		scanptr[0] |=bv;
		*scanptr &= ~bv;
	 ld hl,(#0xFFC0)	;pick up scan ptr
	 ld a,(hl)	;pick up current value
	 out (64),a

The worst annoyance now is that loading any size program is slow and error prone.


From → Olduino/Z

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: