Archive

Posts Tagged ‘uart’

The Zigbee revealed – 2 MiWi A competitor

June 23rd, 2011 1 comment

 

Universal RS232-TTL Adapter – User Manual

February 19th, 2011 No comments

This manual refers to the Adapter shown in this post:

This adapter provides the capability to connect circuits with 3.3V/ 5V logic to a common PC’s COM port  

It provides the capability to take the power directly from the PC’s COM port or directly from the circuit that uses this interface.

Categories: micro controllers Tags: , , , ,

A universal serial RS232 to TTL adapter

February 16th, 2011 1 comment

One of the biggest problems that we have when we begin to play with microcontroller, regards how to "interface" the PC with the microcontroller using the serial line (RS232).

Categories: micro controllers Tags: , , , ,

A tiny printf for embedded systems

January 17th, 2011 3 comments

 


Often embedded systems have small amount of RAM and flash, so you could have the need of specifically written standard functions.


One of the most commonly used function is the printf because it can be used to debug your application, on the internet you can find a lot of implementation of the printf function, the one I prefer is the following:

The Usart Bla bla bla: Using the Standard IO facilities #16

May 28th, 2010 No comments

 

Using the Standard IO facilities of the avr-libc 

The avr-libc gives some facilities of the standard I/O. Only a limited subset of the standard IO is implemented (refer to the <stdio.h>: Standard IO facilities section of the avr-libc manual.). The uart.c source code could be used to interface the uart device with the Standard IO. The following example from the stdio man page of avr-libc illustrates the usage of the uart library.

The Usart Bla bla bla: The command line arguments #15

May 18th, 2010 No comments

The getopt function
int getopt(int argc, char * const argv[], const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
The getopt function is used to parse command option. The parameters argc and argv are the argument count and argument array as passed to the “command”. The argument optstring is a string of recognized option characters; if a character is followed by a colon, the option takes an argument.

The Usart Bla bla bla: The shell functions #14

May 11th, 2010 No comments

The Shell functions
The shell contains the following functions:

  • vConsoleLoop
  • vEchoff
  • vEchon
  • iGetChar
  • iPutChar
  • cGetLine

The Usart Bla bla bla: functions #13

April 27th, 2010 No comments

The Uart bla bla bla functions


NAME

uart_init  — Init the UART port.

 

SYNTAX

#include “uart.h”

 

char uart_init (unsigned long ulBaudRate,

unsigned char ucParity,

unsigned char ucDataBit,

unsigned char ucStopBit

)

The Usart Bla bla bla: My USART implementation #12

April 20th, 2010 No comments

 

My U[S]ART implementation

My USART software is based on the ATMEL application note AVR306 : Using the AVR® UART in C.

The original source code of the application note was changed to support receiver error and to support  some of the capabilities of the avr UART interface databit (5..8 ), stop bit (1-2) and parity check (none, odd and even).

The Usart Bla bla bla: Interrupt 3 #11

April 13th, 2010 No comments

UART  Data Register Empty Interrupt

As described the USART can generate interrupt if the data register is empty. The interrupt could be enabled setting the Data Register Empty Interrupt Enable(UDRIE0) . 

The USART Data Register Empty ISR will be executed until the UDRE0 is set (if the global interrupts are enabled).

Statistical data collected by Statpress SEOlution (blogcraft).