Skip to content

Soft-Uart Tx only using software delays only

I was working on a code for a module on my GSM gateway today , for which I had given 1 pin of micro-controller to use as software Tx. Software UARTs usually uses timers to make them robust, but I had already used them all. So I decided to write a code using software delays.

The UART logic is inverted , so to send logic 1 you have to send low signal  and vice versa . Here is my code , hope it might help someone else.

/*
* soft-uart Tx only without any timmer uses software delays
* the baud rate depends on the delay in us , here I am using
* 4800 with a 1 start bit, 8 databits and 1 stop bit
* if you wanna change the baud rate calculate it by 1/baud and
* modify the _delay_us();
*
* Created: 11/21/2012 1:52:37 PM
* Author: AbuUmar
*/
#include <avr/io.h>
#include <util/delay.h>
#define portlow PORTC&=~0x01
#define porthigh PORTC|=0x01
void putchar_soft(char data_soft)
{
 char bit_count=10; // 1+8+1SB
 data_soft=~data_soft;
 char secc=1;char0:
 if (secc=1)
 portlow;
 else
 porthigh;
 _delay_us(208);
 //_delay_us(208);
 for ( char i = 0; i < 8; i++ ) { 
 if(data_soft & 1) 
 portlow; 
 else 
 porthigh; 
 data_soft=data_soft>>1;
 _delay_us(208);
 }
 porthigh;
 _delay_us(208);
 _delay_us(208);
 return;
}
int main(void)
{
 DDRC|=0b00000001;
 porthigh;
char inte=0;
while(1)
 {
 // example use, initializing a var to 0 and sending the data
 // with 1 sec delays
 putchar_soft(inte) ;
 _delay_ms(250);
 _delay_ms(250);
 _delay_ms(250);
 _delay_ms(250);
 inte++;
 }
}

Android Layout Finder – A useful online tool

Android developers have to write a lot of findViewbyId() codes in their java classes, which is often boring, this can be avoided by either use of  annotation based library (dependency injection frameworks) like Android Annotations, RoboGuice (which the Official document of Android suggests to avoid ) or use Android Layout Finder (an online tool).

Android Layout Finder tool can automate process of writing findViewById() code and thereby we can have JAVA code automated way and can save our valuable time.You just have to paste XML layout code and it gives you JAVA code with findViewById and click listeners.

Give it a try :)

Useful Android Libraries

There are many third-party libraries for Android but several of them are “must have” libraries that are extremely popular and are often used in almost any Android project. Each has different purposes but all of them make life as a developer much more pleasant. The major libraries are listed below in a few categories.

Standard Pack

This “standard pack” listed below are libraries that are quite popular, widely applicable and should probably be setup within most Android apps:

Name Description
Retrofit A type-safe REST client for Android which intelligently maps an API into a client interface using annotations.
Picasso A powerful image downloading and caching library for Android.
ButterKnife Using Java annotations, makes Android development better by simplifying common tasks.
Parceler Android Parcelable made easy through code generation
IcePick Android Instance State made easy
Crouton Context-sensitive, configurable alert notices much better than toasts
Hugo Easier logging using annotations

Convenience

  • ButterKnife – Using Java annotations, makes Android development better by simplifying common tasks. Downloadand install as a jar. Make sure to setup eclipse integration for this to work.
  • Dagger – A fast dependency injector for Android and Java.
  • Parceler – Android Parcelable made easy through code generation.
  • IcePick – Android Instance State made easy
  • Hugo – Easier logging within your app
  • AndroidAnnotations – Framework that speeds up Android development. It takes care of the plumbing, and lets you concentrate on what’s really important. By simplifying your code, it facilitates its maintenance
  • RoboGuice – Powerful extensions to Android using dependency injection.
  • Calligraphy – Custom fonts made easy

Extensions

  • Otto – An enhanced Guava-based event bus with emphasis on Android support
  • EventBus – Android optimized event bus that simplifies communication between components.
  • Tape – Tape is a collection of queue-related classes for Android and Java
  • RxJava – Reactive Extensions for the JVM
  • Priority JobQueue – Easier background tasks
  • ACRA – Crash reporting made easy and free. Check the setup instructions and open-source backend.

Networking

  • Picasso – A powerful image downloading and caching library for Android.
  • Ion – Powerful asynchronous networking library. Download as a jar here.
  • Android Async HTTP – Asynchronous networking client for loading remote content such as JSON.
  • Retrofit – A type-safe REST client for Android and Java which intelligently maps an API into a client interface using annotations.

ListView

Easy Navigation

  • PagerSlidingTabStrip – An interactive indicator to navigate between the different pages of a ViewPager.
  • ViewPagerIndicator – Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.
  • JazzyViewPager – Pager with more animations
  • ParallaxPager – ViewPager with Parallax scrolling effects
  • SlidingMenu – Library that allows developers to easily create applications with sliding menus like those made popular in the Google+, YouTube, and Facebook apps.
  • MenuDrawer – Library for easy menu drawers
  • Android Satellite Menu – Radial menu which is configurable reminiscent of the “Path” menu style.
  • ArcMenu – Alternate radial menu modeled after the “Path” menu style.
  • AndroidSlidingUpPanel – Sliding Up Panel
  • DraggablePanel – Panels that can be dragged

UI Components

Drawing

Scanning

Persistence

Compatibility

Resources

Check out the following resources for finding libraries:

References

Sim800H EAGLE library / footprint

SIM800H is a complete Quad-band GSM/GPRS solution in a LGA type which can be embedded in the customer applications.
SIM800H support Quad-band 850/900/1800/1900MHz, it can transmit Voice, SMS and data information with low power consumption. With tiny size of 15.8*17.8*2.4 mm, it can fit into slim and compact demands of customer design.  Featuring Bluetooth, FM and Embedded AT, it allows total cost savings and fast time-to-market for customer applications.

 

SIM800H

SIM800H

Product details

Download Library for Eagle Cadsoft

Beagle Bone linux images

What is BeagleBone Black?

BeagleBone Black is a low-cost, community-supported development platform for developers and hobbyists. Boot Linux in under 10 seconds and get started on development in less than 5 minutes with just a single USB cable.

MKCCE3-0_grandeMKCCE3-1_grande

Processor: AM335x 1GHz ARM® Cortex-A8

  • 512MB DDR3 RAM
  • 4GB 8-bit eMMC on-board flash storage
  • 3D graphics accelerator
  • NEON floating-point accelerator
  • 2x PRU 32-bit microcontrollers

Connectivity

  • USB client for power & communications
  • USB host
  • Ethernet
  • HDMI
  • 2x 46 pin headers

Software Compatibility

  • Debian
  • Android
  • Ubuntu
  • Cloud9 IDE on Node.js w/ BoneScript library
  • plus much more

 

 

 

 

 

The following link hosts all beagle-bone images and is actively maintained.It includes flasher and SD card images of angstrom, debian and ubuntu builds. Those who wish to compile the kernel from source may also do so.

https://rcn-ee.net/deb/

iOS Libraries and tools for developers [iPhone iPod iPad]

2D Game Engines

3D Game Engines

Analytics

 

 

 

 

 

 

 

Read more

Android Libraries and tools collection

A collection of free and opensource libraries and tools for developers that can prove to be very helpful.

STM32 Microcontrollers – Prior to Start

STM32 ARM-based micros from STMicroelectronics pack high density resources than any other conventional microcontroller. They are also high speed devices, operating typically at 72MHz and beyond. Despite several advanced features and heavy resources, they turn out to be misfortunes for beginners who wish to play with them. Available in market are several cool STM32 boards but most of them are not well documented. The aim of this document is to address some common FAQs.

Typically most people ask the following question:

  • How to program the STM32 micro embedded in my development board?
  • What tools do I need to get started?
  • What compiler support do I have for STM32?
  • What resources are available for STM32 on the internet?

Read more

EAGLE footprint for Dual rj45 stack from Leyconn Leyconn-55913

I am sharing the Cadsoft EAGLE footprint for Leyconn-55913 A double tier rj45 jack. It has two rj45 stacked one over other and has no LEDs. You can find below the product info  and the library.   Download :   Leyconn-55913 dual rj45 jack.lbr

 

     55913 Board Mount Telephone Jack
Series 5921 Contacts: 8 Ways,NON LED Double Tier 2 Port,NON Shield

Cadsoft Eagle footprint Library Little Fuse 658 659 series SMD

LITTELFUSE WICKMANN 66000001009 FUSE HOLDER COVER

Accessory Type: Fuse Holder Cover
For Use With: Littelfuse 658 Series Fuse Holders
RoHS Compliant: YES
SVHC: No SVHC (20-Jun-2013)
Technical Data Sheet (82.98KB) EN

CaptureCapture

 

 

 

 

 

LITTE_FUSE_658 LF-658

Available in  the Library here