The Tinusaur Boards are Back in Stock

Posted on

Tinusaur Starter KitFinally!

All the parts were received from our suppliers – The Tinusaur Board and The Tinusaur Starter are back in stock at our online store at Storenvy.

We don’t have the resource to supply more that couple of hundred boards at once so if they sold out like the last time please be patient – we will replenish our online store as soon as we can.

The prices, as it is our promise, have not changed since the first batch of boards we shipped. We don’t make profit either. So if you really want to help us keep this project going please consider making a small donation via PayPal.

The First Tinusaur Workshop

Posted on

The first official Tinusaur workshop took place last Sunday (on the 14th of December) in the Veliko Turnovo University “St. St. Cyril and Methodius”. It was really great!

The workshop was attended by 22 people of age 16 to 44.

The Tinusaur Workshop

As you may have guessed already it was for the absolute beginners so we first learned how to solder basic things like resistors, capacitors and other small parts. Then we move to soldering The Tinusair Board.

The second part was programming the with the “Hello World” of the microcontrollers – a blinking LED.

Not all people who wanted could attend the even so we may organize another one in the first months of the next year.

 

OWOWOD – One Wire / One Way Output for Debugging the Tinusaur (Part 2)

Posted on Updated on

In my previous post “OWOWOD – One Wire / One Way Output for Debugging the Tinusaur (Part 1)” I wrote how to get a proper reference signal from a serial communication using USB-to-Serial TTL converter.

The Tinusaur BoardThe next steps are to generate the same signal but programmatically using the ATtiny85.

And this is what I did …

I used a ATtiny85 board, the Tinusaur – as you may have guessed already, connected with USBasp programmer to the computer.

The PB0 is used as output but any other available port could be used. That could be done by changing the OWOWOD_PORT in the source code below.

The output is connected to the second digital channel of my DSO Quad oscilloscope.

Here is a fragment of the code that generates the output sugnal …

#define OWOWOD_PORT	PB0	// OWOWOD Port

inline void owowod_init(void) {
	DDRB |= (1 << OWOWOD_PORT);	// Set port as output
	PORTB |= (1 << OWOWOD_PORT);	// Set to HIGH
}

#define OWOWOD_DELAY	23	// Delay for each bit

inline void owowod_delay(void) {
	for (uint8_t i = OWOWOD_DELAY; i != 0; i--) {
		asm volatile ("nop\n\t");
	}
}

void owowod_print_char(uint8_t c) {
	PORTB &= ~(1 << OWOWOD_PORT);	// Set to LOW
	owowod_delay();
	for (uint8_t i = 0; i < 8; i++)
	{
		if (c & 1) {
			PORTB |= (1 << OWOWOD_PORT);	// Set to HIGH
		} else {
			PORTB &= ~(1 << OWOWOD_PORT);	// Set to LOW
		}
		owowod_delay();
		c = (c >> 1);
	}
	PORTB |= (1 << OWOWOD_PORT);	// Set to HIGH
	owowod_delay();
}

int main(void)
{
	owowod_init();
	while (1) {
		owowod_print_char(0x55); // "U"
	}
	return (0);
}

The owowod_init() function sets the port as output and its level to high which is the default for the serial communication.

The owowod_delay() function is a custom delay function that should produce a delay that is equivalent of 1 bit of serial data. This is just an empty loop that I experimentally determined how long it should be.

The owowod_print_char(uint8_t) function outputs one byte of data in serial – starting from the least significant bit of that byte.

To run the test I first started the COMStressTest program and let it output the “U” character (ASCII code in HEX 0x55) indefinitely.

IMPORTANT: All the tests were done with the default settings for the serial COM port which are 9600 bps, 8 bits of data, no parity check and 1 stop bit. This is sometimes denoted as 9600 / 8-N-1 configuration.

Then I ran the C program on the ATtiny.

The graphic on the oscilloscope looked like this …

Serial Debugging Oscilloscope

To get the two signals the same took of course some time to figure out what the timings (the delay between bits) should be.

I am now another step farther.

The next step will be to write a simple debugging library for printing strings and numbers.

PREVIOUS PART: OWOWOD – One Wire / One Way Output for Debugging the Tinusaur (Part 1)

OWOWOD – One Wire / One Way Output for Debugging the Tinusaur (Part 1)

Posted on Updated on

I always wanted to be able to write something like this in my code

 debugging_print("working, x=%i", x); 

… have that running on the micro-controller and see the debugging output on my computer.

The Problem

Unfortunately that is not easy – in fact not possible with the standard tools used to work with the ATtiny85. The problem is this: (1) those micro-controllers have too few I/O ports; and (2) most of the programmers (the one I’m using is USBasp) do not offer that kind of communication between the micro-controller and the computer, i.e. there is no 2-way communication.

There are many solutions to that problem and while looking on Internet I found this article http://www.ernstc.dk/arduino/tinycom.html that points to some of them:

Since the purpose of The Tinusaur Project is learning I decided to write my own.

USB to Serial TTL
USB to Serial TTL Converter

To do that I needed:

The USB-to-Serial TTL is a device that when connected to the USB port of the computer will look to the operating system like a Serial COM Port. Writing data to that COM port will result in transferring that data through the converter and out to the output pin called TxD – in serial form. It work similarly when receiving data from an external source of signal connected to the RxD pin.

I connected the PB0 of the ATtiny85 to the RxD of the USB-to-Serial TTL and did some experiments. Soon I realized that the timing of the signals was critical for this to work and I needed better way to compose the serial data.

Reference Character Generator

First thing – a serial data character generator that I can use as reference – and what could be better than an original USB-to-Serial converter.

I also needed a software that will generate sequence of test characters that I would use as a test signal. First I though of writing a simple Java program that will send the data to the COM port but then I found an application on Internet that does that already – COMStressTest from AGG Software at http://www.aggsoft.com/com-port-stress-test.htm.

COM Stress Test

I specified my testing data in the “Data source” tab as an external file.

The best testing sequence in this case would be string of “U” characters. This is because the generated signal will consist of equal LOW and HI intervals known also as square wave signal.

 ASCII "U" = 0x55 = 01010101 

To look more precisely at the signal form and parameters I used an oscilloscope – mine is DSO Quad from Seeedstudio at http://www.seeedstudio.com/depot/DSO-Quad-4-Channel-Digital-Storage-Oscilloscope-p-736.html.

The signal should look like this …

Oscilloscope Serial Signal

That’s all for now.

The next step will be to write some code for the ATtiny that will generate the same sequence – all “U” character and try to make it exactly the same as the reference one.

IMPORTANT: All the tests were done with the default settings for the serial COM port which are 9600 bps, 8 bits of data, no parity check and 1 stop bit. This is sometimes denoted as 9600 / 8-N-1 configuration.

NEXT PART: OWOWOD – One Wire / One Way Output for Debugging the Tinusaur (Part 2)

Quick Update for September and October

Posted on

This is quick update for September and October.

The presentation at Maker Faire in New York (http://makerfaire.com/new-york-2014/) on Sept. 21st went very well – 80% full of the small auditorium. The Faire itself was terrific.

On October 15, as part of the European CodeWeek (http://codeweek.eu/) the Tinusaur Project was presented to the students and teachers at one of the schools in Gorna Oryahovitsa, Bulgaria – PGEE “M. V. Lomonosov”.

On October 25, at HOW.CAMP (http://how.camp/) 4 of the prizes were Tinusaur Starters kits.

What’s coming up …

– Video tutorial: “How to assemble the Tinusaur Board”. We need some more time to process the video-materials we shot.

 

It’s official: the Tinusaur will be presented at Maker Faire in New York

Posted on

Maker Faire New York - The Greatest Show and Tell on EarthIt’s official: The Tinusaur Project will be presented at the Maker Faire that is taking place in New York this month – on Sunday, September 21st at 3:15pm on the “Make: Electronics Stage”

 

Come see us there!

 

More information is available at this address: http://makerfaire.com/makers/the-tinusaur-project-minimal-microcontroller-platform-to-start-with-learning-and-creating-things/

C Library for ATtiny85 to Work with SSD1306 Controlled OLED Display

Posted on Updated on

I recently bought an OLED display 128×64 from eBay (http://www.ebay.com/sch/i.html?_nkw=OLED+128) – very inexpensive (about 4 euro) but when I finally received it I was surprised to see how small it was – I was expecting something that looked more like the Nokia 3310 LCD. So I thought – this is perfect for the Tinusaur Project. The 128×64 OLED is controlled by a SSD1306 circuit and could be interfaced over I²C. The first challenge that I faced was that all existing libraries that I found were for Arduino boards … and I wrote my own based, of course, on existing code – the SSD1306xLED library.

SSD1306xLED library for OLED/PLED 128x64

SSD1306xLED is a C library for working with the SSD1306 display driver to control dot matrix OLED/PLED 128×64 displays. It is intended to be used with the Tinusaur board but should also work with any other board based on ATtiny85 or similar microcontroller – ATtiny45/ATtiny25, even ATtiny13.

The code could be divided in 3 pieces: (1) communication over I²C with the SSD1306; (2) sending graphical commands to the display; (3) high-level functions such as printing characters.

The I²C communication part is based on modified IIC_wtihout_ACK library that is available on the Internet but its original website (http://www.14blog.com/archives/1358) is no longer functional. Basically, it made it to work on ATtiny85 and Tinusaur.

The SSD1306xLED library still needs work and improvements.

The main location for the library is SSD1306xLED page.

The source code along with very simple example is available on Bitbucket at this address: https://bitbucket.org/tinusaur/ssd1306xled