background preloader

Embedded Programming

Facebook Twitter

A FIFO Buffer Implementation. Embedded Design October 2, 2013 A FIFO buffer is a useful way of storing data that arrives to a microcontroller peripheral asynchronously but cannot be read immediately.

A FIFO Buffer Implementation

Nasa c style. Modern C++ in embedded systems – Part 1: Myth and Reality. In 1998, I wrote an article for Embedded Systems Programming called C++ in Embedded Systems – Myth and Reality.

Modern C++ in embedded systems – Part 1: Myth and Reality

The article was intended to inform C programmers concerned about adopting C++ in embedded systems programming. A lot has changed since 1998. Many of the myths have been dispelled, and C++ is used a lot more in embedded systems. There are many factors that may contribute to this, including more powerful processors, more challenging applications, and more familiarity with object-oriented languages.

C Compiler Tips & Tricks. Hello, there.

C Compiler Tips & Tricks

My name is George Mock, and I'll be your guide on this talk. The reason you should be listening to me is that I've been working at Texas Instruments for over 20 years. And during that entire time period, my job has had something to do with either C compilers, assemblers, linkers, and tools of that nature. We call tools like that-- the name for the whole group of them, we call them the code generation tools. And this talk is Code Generation Tools, Tips and Tricks. Now, the first thing I want you to see is all the places I want you to go to when this slide set doesn't answer your questions. If that doesn't satisfy your query, the second half of this slide talks about the compiler forum. And also it's searchable. USB Interface Board Tutorial Using PIC18F4550. CONTROL YOUR DEVICES FROM COMPUTER USING USB PORT – pic18f4550 + MPLAB IDE This project demonstrates a computer control interface using a USB Board.

USB Interface Board Tutorial Using PIC18F4550

(USB INTERFACE PROJECT). This tutorial will show you a simple way to control some device like led, motors and other devices with computer through a USB Board. The traditional way to control devices from a computer was to use a parallel printer port which is much more easy to implement than that of a USB PROJECT, but the only limitation with parallel printer port is that the latest computer does not comes with parallel printer port. 4 Wheel Robot Design using Differential Steering. Challenges in 4 Wheel Drive Robot Design (Differential Steering) Hi today we are going to discuss some of the basics of physical designing and selecting a chassis for a 4 wheel drive Robot for beginners.

4 Wheel Robot Design using Differential Steering

For this topic we are specifically going to see some of the design oriented challenges that come in the way of designing a 4 wheel robot that uses Differential Steering for taking turns (left and right) or to make a Complete 360 Degree in-place (pivot) rotation (zero-radius turning). Attention to some basic details can help a beginner to make an efficient robot without loss of much energy and torque.

There are many approaches that can be followed for steering a 4 wheel robot, such as the famous car-type steering (Ackerman steering), Cab-Drive Steering, Omni Directional wheels and the Differential Steering method, where the speed of the wheels are altered to change the direction or to take turns. Pivot Rotation of Robot Basic Designs. Design by Contract (DbC) for Embedded Software. What is the Design by Contract programming philosophy, what can it do for you, and why should all embedded software developers care?

Design by Contract (DbC) for Embedded Software

PIC based enhanced 5/2 day central heating programmer serial CLI operation. Serial CLI Operation The serial interface operates at 9600bps using 8 bits, no parity, 1 stop bit.

PIC based enhanced 5/2 day central heating programmer serial CLI operation

The programmer does not implement any handshaking or flow control. If automated control of the interface is used it must monitor the output to ensure a CLI command prompt has been received before sending the next command otherwise the programmer input will overrun. At power up the programmer sends a VT100 [ESC] c command followed by the text 'CH Programmer' to the serial interface and then a '#' command prompt. The programmer uses a '#' as the command line prompt and '? ' The CLI does not support the backspace function or editing keys. Efficient C Tips #5 – Make ‘local’ functions ‘static’ « Stack Overflow.

Saturday, December 13th, 2008 by Nigel Jones In my humble opinion, one of the biggest mistakes the designers of the ‘C’ language made, was to make the scope of all functions global by default.

Efficient C Tips #5 – Make ‘local’ functions ‘static’ « Stack Overflow

In other words, whenever you write a function in ‘C’, by default any other function in the entire application may call it. To prevent this from happening, you can declare a function as static, thus limiting its scope to typically the module it resides in. My favorite software debouncers. Jack breaks out the real code for taming the recalcitrant but ubiquitous mechanical switch.

My favorite software debouncers

After last month's look at the Embedded Systems Conference we're back to the surprisingly deep subject of debouncing switch inputs. But first, a mea culpa for mixing up formulas in May's column ("Solving Switch Bounce Problems," May 2004, on pages 46 and 48). The first and second formulas were accidentally swapped. To see the corrected version, go to www.embedded.com/showArticle.jhtml? ArticleID=18902552. Software debounce routines range from some quite simple approaches to sophisticated algorithms that handle multiple switches in parallel. Consider the simplest of all debouncing strategies: read the switch once every 500ms or so, and set a flag indicating the input's state. Software FIFO Buffer for UART Communication - Microcontroller - eewiki. AMF ENT T0001. Code review checklist v1 00.

Embeded%20Systems%20Building%20Blocks%202e. GetAwesomeness() A curated list of C good stuff.

getAwesomeness()

This list contains only free software for code, and sellers who aren't evil for physical resources. This is released under the GNU Free Documentation License - its text is provided in the LICENSE file. This list was previously maintained by @kozross. He decided to switch the list to a new platform, so I've decided to fork it so we could keep it on GitHub.

Your contributions are highly welcome. For more awesome lists, see awesome. Contents Build Systems These are tools to automate the building and testing of projects in C. ZyBooks. Embedded Software in C for an ARM Cortex M. Embedded Software in C for an ARM Cortex M Jonathan W. Valvano and Ramesh Yerraballi (1/2015) Chapter 1: Program Structure A sample program introduces C C is a free field language Precedence of the operator determines the order of operationComments are used to document the software Preprocessor directives are special operations that occur first Global declarations provide modular building blocks Declarations are the basic operations Function declarations allow for one routine to call another Compound statements are the more complex operations Global variables are permanent and can be shared Local variables are temporary and are private Source files make it easier to maintain large projects Chapter 2: Tokens ASCII characters Literals include numbers characters and strings Keywords are predefined Names are user defined Punctuation marks Operators.

Embedded Software in C for an ARM Cortex M. Articles About Embedded Systems. 8 and 16 Bit Microcontrollers - A look at the state of smaller CPUs 10 Years After - My 120th column for ESP and what I've learned 2028, A Dystopian Story - They're getting near. I'm in hiding. 386 Protected Mode - Part 1 of a two part article about protected mode. 386 Protected Mode - Part 2 of a two part article about protected mode 99 Years Ago This Month - A look back to the technology of 1907 A Boss's Quick Start to Firmware Engineering, Part 1 - Most bosses don't understand the issues involved in producing great firmware. Show them this. Simple 8-bit Assembler Simulator in Javascript. Untitled. Download MVC example - 22.16 KB Introduction Model-view-controller (MVC) is a pattern used to isolate business logic from the user interface.

Using MVC, the Model represents the information (the data) of the application and the business rules used to manipulate the data, the View corresponds to elements of the user interface such as text, checkbox items, and so forth, and the Controller manages details involving the communication between the model and view. The controller handles user actions such as keystrokes and mouse movements and pipes them into the model or view as required. Background. Model-View-Controller. The Model-View-Controller design pattern (MVC) is quite old.

Variations of it have been around at least since the early days of Smalltalk. It is a high-level pattern in that it concerns itself with the global architecture of an application and classifies objects according to the general roles they play in an application. Ooc. Why Learning to Code is So Damn Hard. Quincy Larson was just a "guy in a suit in an office" and decided he wanted to learn how to code. So he asked around. He started by picking up a bit of Ruby then found himself skimming through other languages like Scala, Clojure and Go. He learned Emacs then Vim and even the Dvorak keyboard layout. A Very Quick Comparison of Popular Languages for Teaching Computer Programming. Optimizing C and C++ Code. SecretsOfArduinoPWM. Secrets of Arduino PWM by Ken Shirriffwith further editing by Paul Badgerthe original document. Don’t Follow These 5 Dangerous Coding Standard Rules « Barr Code.

SD Cards and FAT filesystems for STM32 cortex m3 - The STM32 Discovery Scrapbook from Nano Age. Generic FAT file system code Chans FatFS. Problem FatFs creating and writing file , getting FR_DISK_ER. Hello all! Since I´ve been searching at the forum for any help about this and I didn´t find anything useful I´ll post it just in case you know what can be happening. The thing is that I´ve been able to compile FatFs, downloading it from chan´s webpage , I´m using the last version 0.09A and a ATmega32 with a KINGSTON 512mb SDC. [AM3359 & FatFS] Did someone successfully write data on microsd memory card? - StarterWare forum - StarterWare - TI E2E Community. In reply to eugenio: Forum - SD Card Bootloader - STMicroelectronics. In this thread I discuss how to reboot the processor and alter the startup behaviour here : I program the flash in the early boot conditions because I can strongly control the environment, and there aren't random parts of the system running from flash and interrupting.

To improve the chances of success flashing should be done in a quiet system. How to Use MMC/SDC. Update: February 18, 2013 The Secure Digital Memory Card (SDC below) is the de facto standard memory card for mobile equipments. FatFs - Generic FAT File System Module. What Belongs in a C .h Header File? « Barr Code. FreeRTOS on NXP LPC1769 MCU: Getting Started. Get to know FreeRTOS from the Creator! - DesignWest 2013.

CmpE146RefFiles_StackAndHeap.pdf. RTOS Tutorial - Using an RTOS on small embedded computers. Barcode Diagram by Scott Blake. FREE RTOS idle task. Atmel-42141-SAM-AT02333-Safe-and-Secure-Bootloader-Implementation-for-SAM3-4_Application-Note. AN4695.pdf. FatFs - Generic FAT File System Module. AN11511: LPC11U6x In-Application Programming. Sdcard_appnote_foust.pdf. Using Maxim DS1307 Real Time Clock with Atmel AVR Microcontroller. Uzebox - The ATMega Game Console. Amazon.com: Programming Embedded Systems in C and C++ (9781565923546): Michael Barr: Books.

I2C Two Wire Interface Tutorial: Introduction. Paul's 8051 Code Library: Understanding the FAT32 Filesystem. Embedded Systems Articles. Welcome - Embedded Systems Academy. 557. PICTURE TO ASCII CONVERT - PICASCII.