Breadboard Prototyping with Atmel Xplained Boards

Breadboard prototyping with an Atmel Xplained board is not as easy as using a board such as an Arduino which allows jumper wires to be connected directly from the board’s headers to the breadboard.

Easily Connecting to an Atmel Xplained Board for Breadboard Prototyping

One solution to easily connect to an Atmel Xplained board from a breadboard is to make up a ribbon cable with two female IDC connectors. This allows jumper wires to be inserted into the IDC connector which can then be connected to a breadboard or breadboard circuit. The image below shows how this is done.

Breadboard Prototyping with an Atmel Xplained Pro Board

Breadboard Prototyping with an Atmel Xplained Pro Board

The above arrangement of breadboard prototyping is used in the ASF ARM tutorial series that teaches how to use the Atmel Software Framework on ARM Cortex microcontrollers.

The board in the above image is a SAM4N Xplained Pro board.

Floating Point Numbers don’t Print with sprintf in Atmel Studio AVR C

When writing C program code for 8-bit Atmel AVR microcontrollers and using Atmel Studio, functions such as printf() and sprintf() do not print floating point numbers of type float. Instead of printing a float to a string or standard output, a question mark is printed.

Question Mark is Printed from the sprintf Function Instead of Float Number

The image below shows the output from the serial port of an AVR microcontroller that printed a floating point number to a string using the sprintf() function. The string was then sent to a terminal program running on a PC. The C program was built in Atmel Studio 7 using the default project settings. As can be seen, floating point numbers don’t print with sprintf, but a question mark is printed instead of the expected number.

Floating Point Numbers don't Print with sprintf in Atmel Studio AVR C

Floating Point Numbers don’t Print with sprintf in Atmel Studio AVR C

Cause of the float Printing Problem

The problem occurs because Atmel Studio 7 uses the minimal version of the function that all the printf family of functions rely on. Using the minimal function reduces code size of the printf family of functions which is desirable when using microcontrollers, especially the smaller 8-bit AVR microcontrollers that have small amounts of memory. Floating point numbers are not supported by the minimal function, causing the question mark to be printed instead of the floating point number.

Printing float Numbers with sprintf using AVRs and Atmel Studio

To fix the floating point printing problem, the full function that the printf family uses must be linked into the program instead of the minimal function. The article on how to print floating point numbers in AVR C code with Atmel Studio 7 shows how to include the full function by changing linker settings in Atmel Studio.

After changing setting in Atmel Studio, the sprintf function works properly and prints the floating point number to the terminal as shown in the image below.

Printing float Numbers with an AVR Microcontroller using sprintf

Printing float Numbers with an AVR Microcontroller using sprintf

How to Connect a Raspberry PI Touchscreen Display

The new official Raspberry PI touchscreen 7 inch display is now available and connects directly to a Raspberry PI board using a flat ribbon cable and power wires that are supplied with the display.

Raspberry PI Touchscreen Display Running Raspbian

Raspberry PI Touchscreen Display Running Raspbian

 

 

 

 

 

 

 

 

Touchscreen Power

The screen operates from a 5V supply and can be powered from the Raspberry PI header pins using the supplied wires. The screen can also be powered from its own external 5V power supply and has a micro USB connector identical to the one used to supply power to Raspberry PI boards. If a separate power supply is used to power the screen, it must be rated at 500mA or more.

Mounting a Raspberry PI Board on the Touchscreen

Terminal posts are provided at the back of the touchscreen that hold the touchscreen circuit board in place. A raspberry PI board can be mounted on the back of the touchscreen by attaching it with the four screws that are supplied with the screen to the terminal posts.

The image below shows a Raspberry PI 2 model B attached to the back of a Raspberry PI touchscreen.

Raspberry PI Board Mounted on Raspberry PI Touchscreen

Raspberry PI Board Mounted on the Back of the Touchscreen

Connecting a Raspberry PI to the Raspberry PI Touchscreen

It is important to make the connections between the Raspberry PI board and touchscreen correctly, especially the power to the screen when it is tapped from the header of the Raspberry PI board.

A flat ribbon cable is supplied with the screen for making a data connection between the raspberry PI board and screen. Jumper wires are supplied with the board for connecting 5V and GND from the Raspberry PI header pins to the touchscreen to supply power to the screen.

Full connection details including photos and a video can be found in the article on how to connect the official 7″ LCD Raspberry PI touchscreen to a Raspberry PI board.

Raspberry PI Touchscreen Connections

Raspberry PI Touchscreen Connections

 

Arduino Uno Interfacing GT-511C3 Fingerprint Scanner Demo Software

ADH Technology, the company that sells the GT-511C3 fingerprint scanner provide SDK software that includes a demo application for running on a PC. The demo software allows the scanner to be used to enrol fingerprints, each with a unique ID and then identify enrolled fingerprints when a finger is placed on the scanner later. The GT-511C3 fingerprint scanner demo software also includes several other functions that allow fingerprints to be deleted, display number of registered fingerprints, etc.

A USB to TTL level device is normally needed to connect the fingerprint scanner to a Windows PC to use the demo application.

Connecting the GT-511C3 Fingerprint Scanner to a PC using an Arduino

The article on interfacing the GT-511C3 to a PC running the demo software provides a quick hack that uses an Arduino Uno as a USB to TTL converter. The Arduino Uno uses a software serial port to connect to the fingerprint scanner because the only hardware serial port on the Uno is connected to the USB chip which is used as the interface to the PC USB port.

Serial data is relayed between the fingerprint scanner and demo software on the PC by a sketch running on the Arduino. The image below shows the demo application and interface to the scanner. Also see the full article that explains the hardware connections and software needed for the project.

GT-511C3 Fingerprint Scanner PC Demo Software using Arduino Uno

GT-511C3 Fingerprint Scanner PC Demo Software using Arduino Uno