Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,048 members, 7,814,592 topics. Date: Wednesday, 01 May 2024 at 03:49 PM

Microcontroller Programming Corner - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Microcontroller Programming Corner (16012 Views)

How To Make Circular Imageview And Rounded Corner Imageview In Android / Embedded System Tutorial #include<module2.h> :what Is A Microcontroller? / Want To Program PIC Microcontroller In Assembly Language?[enter HERE] (2) (3) (4)

(1) (2) (3) (4) (Reply) (Go Down)

Microcontroller Programming Corner by canachy(m): 5:37am On Jan 10, 2010
I want to beleive that there are embedded systems developers on Nairaland.

I have been developing embedded systems for the past 7 years (for research, academic and commercial purposes -u know what I mean). My favorite Micros are those of the 8051 family.

However, I have been on Nairaland since 2007 and have never read any post relating to this field and I began to wonder whether people are interested in this exciting field, whatever.

Anyways, If u have interest in embedded systems design (microprocessor, microcontrollers, FPGA, PLC e.t.c); either as an amature, a hobbyist or a pro, why don't we rub minds (share our experiences, discuss circuit ideas, solve our problems, create new world of micros, share codes and do all sorts of necessary things as they arise)

Kind Regards
Chibuzor

3 Likes

Re: Microcontroller Programming Corner by sweetpawn2: 1:56pm On Jan 10, 2010
I was this close to programming pics but I had the following problems:
I could not lay my hands on a pic64 chip which was the chip whose programmer was easy to construct given the information found on the net.
From then on, I lost interest. Maybe you can change that. . .
Re: Microcontroller Programming Corner by sweetpawn2: 1:57pm On Jan 10, 2010
I was this close to programming pics but I had the following problems:
I could not lay my hands on a pic64 chip which was the chip whose programmer was easy to construct given the information found on the net.
From then on, I lost interest. Maybe you can change that. . .
Re: Microcontroller Programming Corner by sweetpawn2: 1:57pm On Jan 10, 2010
I was this close to programming pics but I had the following problems:
I could not lay my hands on a pic64 chip which was the chip whose programmer was easy to construct given the information found on the net.
From then on, I lost interest. Maybe you can change that. . .
Re: Microcontroller Programming Corner by sweetpawn2: 1:58pm On Jan 10, 2010
I was this close to programming pics but I had the following problems:
I could not lay my hands on a pic64 chip which was the chip whose programmer was easy to construct given the information found on the net.
From then on, I lost interest. Maybe you can change that. . .
Re: Microcontroller Programming Corner by PremierRow: 3:35pm On Jan 10, 2010
This is interesting
Can i join the train, although i don't know any thing about micro controller programming but I believe i Can learn.
Course I want to go into electronics.

I am good at writing computer programs but someone told me to go for electrical electronics
is that a good idea
Re: Microcontroller Programming Corner by canachy(m): 5:04am On Jan 11, 2010
sweet_pawn:

I was this close to programming pics but I had the following problems:
I could not lay my hands on a pic64 chip which was the chip whose programmer was easy to construct given the information found on the net.
From then on, I lost interest. Maybe you can change that. . .

This should not discourage you, though I know that pic64 chips are readily available in the market. Why don't you lay your hands on the 8051 family of micros (eg 89s51, 89s52, 89c51, 89c52 etc). they are infact the most popular 8 bit micros used and supported worldwide. Again 8051 is the micro family with largest number of variants in the 8 bit micro industry - there are now over 1,100 different 8051 variants from 55 different manufactures (implication is that u will always find an 8051 family micro that will get ur job done no matter the complexity and u do not need to learn new instruction set for each).

If you are interested, I can teach u. For the chip programmer, I can also teach u how to build chip programmers (, if u are like me, u can develop and build programmer for any micro; provided u have the datasheet of that micro)

Regards
Chibuzor

1 Like

Re: Microcontroller Programming Corner by canachy(m): 5:21am On Jan 11, 2010
PremierRow:

This is interesting
Can i join the train, although i don't know any thing about micro controller programming but I believe i Can learn.
Everybody can join the train. What it takes is interest and dedication, thank God u beleive u can learn (If u can beleive, all things are possible; to him that beleiveth)


PremierRow:

Course I want to go into electronics.
I am good at writing computer programs but someone told me to go for electrical electronics
is that a good idea

Good. Electronics is one of the most sought after courses in Nigeria and the world at large, so u are on the right track - I also studied Electrical/Electronics (majoring in the Electronics/Telecom option).

The fact that u are good in writing computer programs is an added advantage because it will make u appreciate Electronics as a course.
Re: Microcontroller Programming Corner by clintwine(m): 5:36pm On Jan 11, 2010
Hi, love this topic,
Though i have fancied being an embedded programmer cum designer, am still trying to make sense off it.
Presently am learning C and C++ to see how i can apply it, also am learning to write VHDL codes.
My project is actually on building a network packet processor with an FPGA, the processor would be able to run programs used for network monitoring.

Also, i would be designing my processor architecture.
If you have any ideas about how to go or materials, let me know
Thanks.
Re: Microcontroller Programming Corner by IG: 1:18pm On Jan 12, 2010
I have a lot of interest in embedded systems ( I studied Electrical/Electronic) but didn't really give much input to beside casual studies. My problem is that I do not want to stop at the bread-board level but go all the way to make commercially viable devices. So I hit the rock when I was unable to get any company that can print my design on a PCB. I will readily go back once I find the right push to trigger my interest again. Hope this thread will be it.

PremierRow:

I am good at writing computer programs but someone told me to go for electrical electronics
is that a good idea
Electrical engineers make the best computer programmers. When you understand electronics and know software development, the computer becomes to you like a clay to a moulder.

1 Like

Re: Microcontroller Programming Corner by canachy(m): 2:36am On Jan 14, 2010
IG:

I have a lot of interest in embedded systems ( I studied Electrical/Electronic) but didn't really give much input to beside casual studies.

It not too late. I will start a free embedded training class in this thread. maybe that will activate the Einstein in u

IG:

My problem is that I do not want to stop at the bread-board level but go all the way to make commercially viable devices. So I hit the rock when I was unable to get any company that can print my design on a PCB. I will readily go back once I find the right push to trigger my interest again. Hope this thread will be it.

I hope this thread will do it: yes this thread will do it. Good to know that u have worked on the the bread board level. Its high time u started working with PCBs.

To get a fab house that will print ur PCBoards isn't a problem at all. I can help u with that. But first things first. U need to really know ur onion when it comes to Printing Circuit boards (PCB) because one little error will lead to loss of ur hard earned money. I therefore advice that u learn how to use any good PCB software (I recommend Ultiboard or Eagle) though there are thousands of them out there.
Re: Microcontroller Programming Corner by canachy(m): 5:00am On Jan 14, 2010
I would like to start up a tutorial session on Embedded Systems Design here. Before I proceed, I would like us to look at the word Embedded systems.

What is Embedded systems?

Embedded system has grown so wide and varied (with the advancement of technology) that it has become dificult
to pin down its exact definition or description.

But for the purpose of this tutorial, let me define it this way:

An Embedded System is a system that is build with a specific purpose microcomputer (usually called Microcontroller) to perform one or a few specific tasks.

what is this Microcontroller?

A microntroller is a computer in one(1) chip. what do I mean? it is a chip (integrated circuit) that has CPU, EEPROM(Electrically Erasable Programabble-ROM), RAM and I/O ports. u see why i said it is a computer in 1 chip?

Many manufactures have built thousands of Microcontroller families (with different architectures) each tailored to solve a specific problem. one of these manufactures is Intel that built the world first micro (Intel 4004). In the early 80s, Intel introduced the 8051 microcontroller architecture which she has given licence to many chip manufacturers(inluding Atmel, Dallas, Philips etc) to produce after her kind; thus the existence of AT89C51,P8957, AT89S51 etc.

one interesting thing about this microcontroller is that it is programmable (meaning you write code for it just as u would write for ur computer). But, unlike computer, each microcontroller family has its own instruction set that must be used to write code for it; thus making it difficult to work with all the families with the same set of codes - NO (u must know the instructions set for a particular family before u can code it).

Having said this, it makes sense to learn microcontroller programming with refference to a particular family. I have chosen to do this with 8051 family of microcontrollers. Reason being that it is one of the most popular microcontroller families in the world.

Before I say a word about the 8051 family architecture, let us quickly consider a few tools that we will be needing in this venture.

We will be needing both hardware and software kits:

Hardware:

Programmer
Breadboard
Electronic Components {resistors, crystal oscillator, capacitor(electrolytic and paper), Regulator, led, lcd, battery; to mention but a few}


Software:

Assembler/Compiler - Asm51 or sdcc/keil uVision
intel hex converter - Hex51
Simulators - Proteus lite, Topview simulatir etc


Note: with simulators, u may learn without doing all the hardware stuffs (but if u are like me, u can't do without them - harware).

If u are really serious about learning this Embedded systems design, all it takes as dedication and devotion, not money; cos all the software u will need are FREE to download.

Let me stop here so u can prepare ur mind for the main thing.

But before I go, i will like to correct 2 popular misconceptions: that only those with years of experience should undertake embedded systems design AND that the process relies on an understanding of advanced mathematics. Provided u are not too ambitious, neither of these 2 held beleifs is true.

Think about this.

Until I sign in next time, Bye for now.

Kind Regards
Chibuzor Anyagha

3 Likes

Re: Microcontroller Programming Corner by IG: 5:32pm On Jan 15, 2010
canachy:

U need to really know your onion when it comes to Printing Circuit boards (PCB) because one little error will lead to loss of your hard earned money. I therefore advice that u learn how to use any good PCB software (I recommend Ultiboard or Eagle) though there are thousands of them out there.
I have an EDA software installed. It's called gEDA and runs on linux. It's a complete suite that includes a PCB design software which allows you to export gerber files to use in printing PCBs.

I also recently came across a Nigerian company called microscale-embedded thru d google ads on NL. They sell hardware used for embedded development. I think it's important to share the info here. They are at http://www.microscale-embedded.com/
Re: Microcontroller Programming Corner by sweetpawn2: 7:12am On Jan 17, 2010
Interesting!
Okay, it looks like you have ignited my interest a bit.
This new family of processors,can I have the circuit of their programmer and how can one get their data sheet?
Re: Microcontroller Programming Corner by canachy(m): 7:40am On Jan 17, 2010
sweet_pawn:

Interesting!
Okay, it looks like you have ignited my interest a bit.
This new family of processors,can I have the circuit of their programmer and how can one get their data sheet?


I will upload the circuit diagram of the ATMEL ISP89SXX programmer(along side with the software) latter. This will only program the 89SXX series (like AT89S51, AT89S52, etc). but u can start from that one shaa.

In cause of this class I will be teaching how to design your own programmer and write ur custom software (firmware and the GUI). With the technique, u can design even a universal programmer. Yes, I mean what I said

for the datasheet of the Atmels 8051 Architecture go to http://www.atmel.com/dyn/products/datasheets.asp?family_id=604
Re: Microcontroller Programming Corner by canachy(m): 7:42am On Jan 17, 2010
I will continue the tutorial next week, I had a very busy week this week

Regards
Re: Microcontroller Programming Corner by Marria: 2:23pm On Jan 26, 2010
pls i need someone to teach me anything on circuit design and micro-controller practically not online at a student price.
  am a computer engineering student.
so i ve been looking 4 someone to trian me pls if u can pls e mail me on abfembest@yahoo.com/08130589812 pls.
i like the topic when i saw it on nairaland.
Re: Microcontroller Programming Corner by Nobody: 12:25am On Jan 28, 2010
I am an electronics engineer I Design circuits and build circuits as well. there is a circuit that I built that I used 14 ICs but I later discover that if I use PIC16f84 for it, i would not have used those ICs.

When I read about PIC microcontrollers I learnt that one will require 3 things
1.A programmer
2.A programming software
3.The program itself i.e. the assembly language e.t.c
and one needs to know most of the 35 instruction set.

please can you help me with a programmer circuit diagram and can you teach me the instruction sets or link me to the website I can get the tutorial.
Re: Microcontroller Programming Corner by solomonope(m): 3:36pm On Feb 02, 2010
i can of like this corner and i thought is should contribute a project that any hobbist can play with
am using a pic16f877, i feel pic's are more common here in nigeria than any other place.
The project is just a digital themometer based on lm35 chip that gives a certain voltage based on the temp the voltage then goes to the adc of the pic which is then displayed on the lcd

Parts:
pic16F877
10k resistors *2
25pf capacitors *2
8MHz crystal *1
1 LCd *1
lm35 *1
compiler
MikroC pro
www.mikroelectronika.com
Source:
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
char txt1[] = "WelCome";
void main()
{
unsigned long Vin, mV,Vdec,Vfrac;
unsigned char op[12];
unsigned char i,j,lcd[5],ch1,ch2;
TRISB = 0xff;
TRISA = 0xFF;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,1,txt1);
Delay_ms(2000);
ADCON1 = 0x80;
for(;wink
{
Lcd_Cmd(_LCD_CLEAR);
Vin = Adc_Read(0);
Lcd_Out(1,1,"Temp = "wink; // Display "mV = "
Vin = 488*Vin; // Scale up the result
Vdec = (Vin / 100)*0.5; // Decimal part
Vfrac = Vin % 100; // Fractional part
LongToStr(Vdec,op); // Convert Vdec to string in "op"
//
// Remove leading blanks
//
j=0;
for(i=0;i<=11;i++)
{
{
if(op[i] != ' ') // If a blank
{
lcd[j]=op[i];
j++;
}
}
//
// Display result on LCD
//
Lcd_Out(1,7,lcd); // Output to LCD
Lcd_Out_Cp("."wink; // Display "."
ch1 = Vfrac / 10; // Calculate fractional part
ch2 = Vfrac % 10; // Calculate fractional part
Lcd_Chr_Cp(48+ch1); // Display fractional part
Lcd_Chr_Cp(48+ch2); // Display fractional part
Delay_ms(1000); // Wait 1 second
}
}
}

Circuit Diagram:

Re: Microcontroller Programming Corner by Nobody: 12:02am On Feb 03, 2010
This project is too complicated for beginners.

can you give me the circuit diagram of a running message display using pic16f84
Re: Microcontroller Programming Corner by solomonope(m): 2:12pm On Feb 04, 2010
@aksat it is not realy difficult u can even simulate it first.i use proteous.

here is what u asked for
source:
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
void main() {
TRISB = 0xff;
TRISA = 0xFF;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
for(;wink{
Lcd_Out(1,1,"Hello World"wink;
Delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR);
Delay_ms(2000);

}
}

cct:

Re: Microcontroller Programming Corner by Nobody: 7:44am On Feb 06, 2010
May be I forgot to tell you that I need the LED type. This LCD is not big enough and it cannot be seen clearly at night. please can you give me the type that can use with multiplexed LED af about 7 rows and 20 column.

And also I need the Programmer circuit diagram USB or Serial port type.
Re: Microcontroller Programming Corner by solomonope(m): 10:23am On Feb 08, 2010
@aksat
dot matrix modules that is what u need. u can look for them in oshodi shop a7.
i have a friend that builds programmers for sale > =N=10,000 i can contact him on the cct.
Re: Microcontroller Programming Corner by Nobody: 8:37am On Feb 12, 2010
Is a programmer that expensive? I thought it is just to connect the microcontroller to a computer with just few connection and components.
Re: Microcontroller Programming Corner by sunnyben: 7:37pm On Feb 16, 2010
Hi Mr Canachy

That's very nice of you.

I read electrical engineering, I'm grounded in C programming and I have a little knowledge of Assembly.

I got to know that PIC programming can be done with C, that's PIC32.

But i'm still not sure whether it can be done absolutely in C without any other requirements

Are there good prospects in Embedded programming in Nigeria? I wasn't sure of this that was why I went for Java and i'm currently busy with that now
Re: Microcontroller Programming Corner by StanIyke(m): 4:17pm On Feb 17, 2010
Nice Work Chibuzor Anyaagha, Kip repin NAU, Wel, how possible is it for one 2 embbed a software developed with Visual Basic 6 in a hardware and wat are the necessary materials for this. I await ur reply. Tanks.
Re: Microcontroller Programming Corner by StanIyke(m): 4:19pm On Feb 17, 2010
Nice Work Chibuzor Anyaagha, Kip repin NAU, Wel, how possible is it for one 2 embbed a software developed with Visual Basic 6 in a hardware and wat are the necessary materials for this.  I await ur reply. Tanks.
Re: Microcontroller Programming Corner by Richchild1: 4:53am On Feb 19, 2010
Pls i am searching for a place where i can learn how to design and build electronics circuit. Pls you can send it to my mail: rikuesan@hotmail.com. Pls and pls somebody help me out.
Re: Microcontroller Programming Corner by dipopeter: 7:53pm On Feb 22, 2010
I will appreciate it if only u'll accept newbies like me. I'm a don't net developer so I shouldn't find that difficult.
My interest is cool.
Re: Microcontroller Programming Corner by Nobody: 4:12pm On Mar 01, 2010
@ rich go to www.savotechelectronics.webs.com  you will get many links to electronics circuits and tutorials
Re: Microcontroller Programming Corner by canachy(m): 6:32pm On Mar 01, 2010
Marria:

pls i need someone to teach me anything on circuit design and micro-controller practically not online at a student price.
am a computer engineering student.
so i ve been looking 4 someone to trian me pls if u can pls e mail me on abfembest@yahoo.com/08130589812 pls.
i like the topic when i saw it on nairaland.


may send an email to training@twichisystems.com(copy:canachy at yahoo.com). We can help u with that.

aksat:

I am an electronics engineer I Design circuits and build circuits as well. there is a circuit that I built that I used 14 ICs but I later discover that if I use PIC16f84 for it, i would not have used those ICs.

When I read about PIC microcontrollers I learnt that one will require 3 things
1.A programmer
2.A programming software
3.The program itself i.e. the assembly language e.t.c
and one needs to know most of the 35 instruction set.

please can you help me with a programmer circuit diagram and can you teach me the instruction sets or link me to the website I can get the tutorial.


yes you need a programmer, the software and asm (assembler) or c (c-compiler)/ etc to get started


aksat:

This project is too complicated for beginners.
can you give me the circuit diagram of a running message display using pic16f84


as a beginner, you sholud start from simple designs to avoid being discouraged before long. Take it one step at a time, you will succeed


aksat:

Is a programmer that expensive? I thought it is just to connect the microcontroller to a computer with just few connection and components.

well imported programmers are fairly expensive, but you can build one for yourself, its not that difficult.

sunnyben:

Hi Mr Canachy

That's very nice of you.

I read electrical engineering, I'm grounded in C programming and I have a little knowledge of Assembly.

I got to know that PIC programming can be done with C, that's PIC32.

But i'm still not sure whether it can be done absolutely in C without any other requirements

Are there good prospects in Embedded programming in Nigeria? I wasn't sure of this that was why I went for Java and i'm currently busy with that now

Good to know that you are grounded in C. you can program any programmer easily in C both you need to know a little about their registers accesses and all that.

Since you a C master, learning to program microcontroller will be a cinch, but mind you it end there - there is much more than that.

since you are already in Java, finish that one firest and you proceed onto embedded later. There are good prospects

Stan Iyke:

Nice Work Chibuzor Anyaagha, Kip repin NAU, Wel, how possible is it for one 2 embbed a software developed with Visual Basic 6 in a hardware and wat are the necessary materials for this.  I await your reply. Tanks.

Thanks for your nice words.

It is impossible to program codes into embedded chips using VB. They are 2 parallel lines that can never meet. The reason is simple - emdedded chips are furnished with compact memory space from 2kbyte to a few 100s of Kbytes. While VB is too "bogous" - generating Mbytes to Gbytes of Codes. But there is no such things as impossible. to make it possible, 2 things are involve:

1.build large memories into embedded chips

2. write a very compact VB compiler that will output very compact codes, far from reallity though.

anyways, If u are in love with VB, there is a lot u can do with VB and embedded chips by interfacing to the computer.

Rich-child:

Pls i am searching for a place where i can learn how to design and build electronics circuit. Pls you can send it to my mail: rikuesan@hotmail.com. Pls and pls somebody help me out.

send email to training@twichisystems.com(copy canachy@yahoo.com) we will help you with that


dipopeter:


I will appreciate it if only u'll accept newbies like me. I'm a don't net developer so I shouldn't find that difficult.
My interest is cool.


SURE. every professional started as a newbie. you are welcomed


@ all

I have been way tooooo busy for some time - I still remember my promise to continue with the free tutorial. keep watching - in no time we are going to kick off with full force. Until then keep cracking.

Regards
Chibuzor Anyagha
Re: Microcontroller Programming Corner by kobenol(m): 3:07pm On Mar 05, 2010
I have a Sega TV game clone ( that common mario game console in the 90's) i opened it up recently and found that it has a 8-Bit processor, and i'm thinking of the possibility of loading some program on it perhaps linux. I dont have the slightest idea of how to go about this but if any body could help then may be something positive could evolve

(1) (2) (3) (4) (Reply)

Sage OS (HTML5) : The Development (with download link) / What Programming Languages Do You Know? / Your Future As A Software Developer

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 92
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.