Saturday, August 20, 2016
TASM download link
http://googledrive.com/host/0B0dp0_uCy97GN3JnWWtucC1lQ2s/Tasm%201.4%20Windows%207-Windows%208%2064%20bit%20Techapple.net.exe
Monday, August 15, 2016
Zilog Arduino IDE
The new ZilogArduino IDE....
a.Why Use Zilog Flash Microcontroller if there is an existing arduino from Atmel
ans : ZDS IDE comes with powerfull debugging features that enable programmer to rapidly develop their own programs
b.Can we use zilog mcu in Labcenter proteus to simulate it.
ans: Yes, currently Z8F6421 is supported
c.Will u support ZNeo for use in Labcenter proteus to simulate it.
ans: Z16F2811(ZNEO) VSM for Proteus is under Development depending on Zilog User's response
If you want to download, visit www.wirethemall.com
a.Why Use Zilog Flash Microcontroller if there is an existing arduino from Atmel
ans : ZDS IDE comes with powerfull debugging features that enable programmer to rapidly develop their own programs
b.Can we use zilog mcu in Labcenter proteus to simulate it.
ans: Yes, currently Z8F6421 is supported
c.Will u support ZNeo for use in Labcenter proteus to simulate it.
ans: Z16F2811(ZNEO) VSM for Proteus is under Development depending on Zilog User's response
If you want to download, visit www.wirethemall.com
Saturday, August 13, 2016
Ultrasonic Sensor
Small low-cost ultrasonic distance measurement modules like this: SRF-06 are an effective way to sense the presence of nearby objects and the distance to them. Often Robots use these to sense objects or collisions and take appropriate action.


They have two transducers, basically a speaker and a microphone. Ultrasound is a high frequency sound (typically 40 KHz is used). A short burst of sound waves (often only 8 cycles) is sent out the "Transmit" transducer. Then the "Receive" transducer listens for an echo. Thus, the principle of ultrasonic distance measurement is the same as with Radio-based radar. Distance is calculated as: L = C × T/2 , where L is the length, C is the speed of sound in air, T is the time difference from the transmission from the transmitter to the receiver. This is divided by 2 for the two-directions the sound travels. Speed of sound is about: C = 344m / s (20 degrees C room temperature).
Speed of sound in air velocity is affected by the air density, and for high accuracy the temperature must be taken into account, either within the module electronics (In the SRF-06 module we have) or in the Arduino software.
Accuracy??
It's hard to get good information from the manufacturers. Here are numbers derived from some extensive tests
Note: The US-100 module has 5 pins but two are ground and 1 to 4 are the same.
To test a module with the following Software Sketch, connect 5.0V and Ground to your Arduino, and Trig to Arduino pin 11 and Echo to Arduino pin 10. This photo shows the easy way to do this using a wireduino nd part of a flat cable jumper
Software will do the following:
Turn the Trig pin on and off to send out a sound pulse
Monitor and time how long until the Echo pin sees the echo
Calculate the distance as shown above, possibly correcting for temperature
MATERIALS NEEDED:
1 PC
1 Keyboard and 1 Mouse
1 Wireduino Board
1 USB cable
1 US100 Ultrasonic Sensor
1 Battery or adaptor
PROCEDURE:
1. Connect 5.0V and Ground to your Arduino, and Trig to Arduino pin 11 and Echo to
Arduino pin 10.
2. Below is a sample program for a single servo motor:
#include <NewPing.h>
#define TRIGGER_PIN 11
#define ECHO_PIN 10
#define MAX_DISTANCE 200
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
int DistanceIn;
int DistanceCm;
void setup()
{
Serial.begin(9600);
Serial.println("UltraSonic Distance Measurement");
Serial.println("micro-ontroller.blogspot.com");
}
void loop()
{
delay(100);
DistanceIn = sonar.ping_in();
Serial.print("Ping: ");
Serial.print(DistanceIn);
Serial.print(" in ");
delay(100);
DistanceCm = sonar.ping_cm();
Serial.print("Ping: ");
Serial.print(DistanceCm);
Serial.println(" cm");
}
LCD Interfacing
INTRODUCTION:
In this circuit, you’ll learn about how to use an LCD. An LCD, or liquid crystal display, is a simple screen that can display commands, bits of information, or readings from your sensor - all depending on how you program your board. In this circuit, you’ll learn the basics of incorporating an LCD into your project.
A Liquid Crystal Display (LCD) is a sophisticated module that can be used to display text or numeric data. The display included is two lines of 16 characters, and a backlight so it can be used at night. If you've been using the Serial Monitor to output data, you'll find that a LCD provides many of the same benefits without needing to drag a large computer around. This sketch will show you how to connect an LCD to your Arduino and display any data you wish.
MATERIALS NEEDED:
1 PC
1 Keyboard and 1 Mouse
1 Wireduino Board
1 USB cable
1 Breadboard
1 Potentiometer
16 Jumper Wires
1 LCD 2 X 16
PROCEDURE:
Hardware connections:
The LCD has a 16-pin male header attached to it along the top edge. Pin 1 is the pin closest to the corner of the LCD. Pin 16 is the pin closest to the center of the LCD. Plug the LCD into your breadboard. As usual, you will want to connect the + and - power rails on the side of the breadboard to 5V and GND on your Arduino. Plug your 10K potentiometer into three unused rows on your breadboard. Connect one side of the potentiometer to 5V,and the other side to GND (it doesn't matter which). When you run this sketch, you'll use the potentiometer to adjust the contrast of the LCD so you can see the display.
Now connect the LCD pins. Remember that pin 1 on the LCD is the one closest to the corner. Start there and work your way up.
1 to GND
2 to 5V
3 to the center pin on the potentiometer
4 to Arduino digital pin 12
5 to GND
6 to Arduino digital pin 11
7 (no connection)
8 (no connection)
9 (no connection)
10 (no connection)
11 to Arduino digital pin 5
12 to Arduino digital pin 4
13 to Arduino digital pin 3
14 to Arduino digital pin 2
15 to 5V
16 to GND
Once everything is connected, load this sketch into the Arduino, and adjust the potentiometer until the display is clear.
Library
The LCD has a chip built into it that controls all the individual dots that make up the display, and obeys commands sent to it by the the Arduino. The chip knows the dot patterns that make up all the text characters, saving you a lot of work. To communicate with this chip, we'll use the LiquidCrystal library, which is one of the standard libraries that comes with the Arduino. This library does most of the hard work of interfacing to the LCD; all you need to pick a location on the display and send your data!
Tips:
The LCD has a backlight that will light up when you turn on your Arduino. If the backlight doesn't turn on, check your connections. As we said above, the potentiometer adjusts the contrast of the display. If you can't see anything when you run the sketch, turn the potentiometer's knob until the text is clear.
1. Below is a sample program for a LCD:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup()
{
lcd.begin(16, 2);
lcd.clear();
lcd.print("hello, world!");
}
void loop()
{
lcd.setCursor(0,1);
lcd.print(millis()/1000);
}
Thursday, August 11, 2016
RFID Arduino Program
INTRODUCTION:
RFID – radio frequency identification. Some of us have already used these things, and they have become part of everyday life. For example, with electronic vehicle tolling, door access control, public transport fare systems and so on. It sounds complex – but isn’t.
To explain RFID for the layperson, we can use a key and lock analogy. Instead of the key having a unique pattern, RFID keys hold a series of unique numbers which are read by the lock. It is up to our Arduino sketch to determine what happens when the number is read by the lock. The key is the tag, card or other small device we carry around or have in our vehicles. We will be using a passive key, which is an integrated circuit and a small aerial. This uses power from a magnetic field associated with the lock. Here are some key or tag examples:


In this experiment we’ll be using 125 kHz tags – for example. To continue with the analogy our lock is a small circuit board and a loop aerial. This has the capability to read the data on the IC of our key, and some locks can even write data to keys. Here is our reader (lock) example:
MATERIALS NEEDED:
- 1 PC
- 1 Keyboard and 1 Mouse
- 1 Wireduino Board
- 1 USB cable
- 1 Breadboard
- 1 RFID Reader Package
- 16 Some RFID tags
PROCEDURE:

Next, upload the following sketch to your Arduino and open the serial monitor window in the IDE:
#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX
int i;
void setup()
{
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
}
void loop()
{
if (RFID.available() > 0)
{
i = RFID.read();
Serial.print(i, DEC);
Serial.print(",");
}
}
As you can see from the experiment, the reader returns the card’s unique ID number which starts with a 2 and ends with a 3. While you have the sketch operating, read the numbers from your RFID tags and note them down, you will need them for future sketches.
To do anything with the card data, we need to create some functions to retrieve the card number when it is read and place in an array for comparison against existing card data (e.g. a list of accepted cards) so your systems will know who to accept and who to deny. Using those functions, you can then make your own access system, time-logging device and so on.
Let’s demonstrate an example of this. It will check if a card presented to the reader is on an “accepted” list, and if so light a green LED, otherwise light a red LED. Use the hardware from the previous sketch, but add a typical green and red LED with 560 ohm resistor to digital pins 13 and 12 respectively. Then upload the following sketch:
#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX
int data1 = 0;
int ok = -1;
int yes = 13;
int no = 12;
// use first sketch in http://wp.me/p3LK05-3Gk to get your tag numbers
int tag1[14] = {2,52,48,48,48,56,54,66,49,52,70,51,56,3};
int tag2[14] = {2,52,48,48,48,56,54,67,54,54,66,54,66,3};
int newtag[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // used for read comparisons
void setup()
{
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
pinMode(yes, OUTPUT); // for status LEDs
pinMode(no, OUTPUT);
}
boolean comparetag(int aa[14], int bb[14])
{
boolean ff = false;
int fg = 0;
for (int cc = 0 ; cc < 14 ; cc++)
{
if (aa[cc] == bb[cc])
{
fg++;
}
}
if (fg == 14)
{
ff = true;
}
return ff;
}
void checkmytags() // compares each tag against the tag just read
{
ok = 0; // this variable helps decision-making,
// if it is 1 we have a match, zero is a read but no match,
// -1 is no read attempt made
if (comparetag(newtag, tag1) == true)
{
ok++;
}
if (comparetag(newtag, tag2) == true)
{
ok++;
}
}
void readTags()
{
ok = -1;
if (RFID.available() > 0)
{
// read tag numbers
delay(100); // needed to allow time for the data to come in from the serial buffer.
for (int z = 0 ; z < 14 ; z++) // read the rest of the tag
{
data1 = RFID.read();
newtag[z] = data1;
}
RFID.flush(); // stops multiple reads
// do the tags match up?
checkmytags();
}
// now do something based on tag type
if (ok > 0) // if we had a match
{
Serial.println("Accepted");
digitalWrite(yes, HIGH);
delay(1000);
digitalWrite(yes, LOW);
ok = -1;
}
else if (ok == 0) // if we didn't have a match
{
Serial.println("Rejected");
digitalWrite(no, HIGH);
delay(1000);
digitalWrite(no, LOW);
ok = -1;
}
}
void loop()
{
readTags();
}
What is Microcontroller
Subscribe to:
Comments (Atom)
