This Is The Tomorrow That I Can SEE.."HOPE"
It's quite frustrated actually..
I am officially a intern trainee...actually "intern" is just same to other people , workload maybe will be light a bit..but being a intern is more scary than the permanent staff there or in my case is engineer..
Tomorrow tomorrow.............
my life begin to shorten by 10 hours ...where it go?? Goes to my work .. when i reach home i think also 6pm d...eat dinner finish 8pm d..OK la lets say i very lucky no need work OT at home , i also need to sleep at 11pm , and i left 3 hours only !!
walao , suddenly my whole day long shorten to 3 hours ..when i calculating i got a shock...duhhh shorten so much .. i wan play game also afraid cannot d..
Human same like me is always like that 1...when too free say too free , when going to busy d say busy..just complain complain here only hehe...how they going give me my "allowance" as they stated in the contract..since i 20th only start work == ..maybe first month is for free...
LoL , wish me luck then...i wan learn a lot a lot there..
Hey people lets work out together =D...
OK i think from the title you know this is a engineering stuff...If you interested in this please continue to read on ...if not wait for my next post that will come up once i go work..
It come across my mind that , many people seeking for information that is lack in our college..there's very little information in our library and we don't have much people to help us out in PIC programming either.
I decide to post up a series of link that let other people benefit from what i have learn previously during my Project Lab with my dear best Joshua..This dedicated to you also Mr Yam.
Bear in mind this is just a beginner simple guide .. it wont led you too far away.There maybe certain information that you have come across!
First Phase:
In this phase i assume you are totally new to Microcontroller..
Here's a little advice , that's always good to have your data sheet download and look through it, dont just glance on the pin but also all the feature that microcontroller have.If you have time , just go through the whole data sheet..But i think is rather hard for some people as like 16F877 microcontroller have more than 100 pages.
Learn more about ur microcontroller first before you proceed .. What you need to focus is:
- Feature that in this microcontroller
- Is the feature suite to what you need?
- Is that microcontroller enough for you to interface with the peripheral?
- Lastly , Is your program too large for the microcontroller to support??
Next look into File Register Map, this is very important as you will very frequent refer to this map .. when you writing a program it often consist of few elements:-
- Initialize state (Eg:Declar Particular Port as input or Output, name your register
- Main Body (Whole program instruction code is in here)
- Subroutines (a series of program instruction that will be use in your main body once it called out by main body program instruction using instruction :eg Call or Goto
- Macro (This act as a external library , macro act like include file . This feature is very useful when you wan to shorten your code , but skip this before you learn all the basic as thing will get complicated and mess up when you dont know what you are programing)
This section is where all the features come in Eg:Timer ,Indirect Addressing.
take a look what you need in your project and mark down the Register.
Tips:Print out a hardcopy of special function register to refer to when you are programming in that way is easier for you to program and think of how to use those Register and implement them in your program.
If you continue to read your data sheet ,you will find down there have a lot of explaination for each Register , how you can activate them and make them your worker to work out with you.
It's above is too little for you all or too bored .
What X14 mean is 14 bits microcontroller.Dont worry about those bit if you are using x12 or midrange x16..The basic still the same for all the microcontroller.
More in detail about mid-range microcontroller:
This tell you more about the feature in detail than what you have learn in the particular Microcontroller.
Second Phase:
Once you have determine your microcontroller and understand the architecture.Proceed to programming stage.This is the phase that you spend most time on.
Start off with very simple programming like on LED , dont just copy the coding and paste it wont help you learn how to get your code on hands. Understand the coding by refering to the certain microcontroller Data Sheet what all the command and register about..All the command or instruction code can find through google if you using mid-range device , you can search through the PDF link [Mid-Range Manual] on section 29.
Where you get simple coding with comments beside to guide you?
If you are new to PIC most probably when you search in google or forum many people will tell you about nigel tutorial .. His hard work mean a lot to many people..Take a look on those tutorial.Start with simple program first!
All this is in assembly form , what if you wan a simple programming.
What i learn from those expert is:
- Assembly give u accurate timing.
- C language give u easiser work when you deal with math equation or algorithm.
Here i make a conclusion for you :-
Microelectronika given out a lot of freebies you can search and one of the freebies i love the most is their E-Book .There's some book for assembly and for C..Click on the link and read through it.They have good diagram to explain everything in detail for you what's more they even teach you C/Assembly language along the way.
Try your luck HERE , click on any selection and click on the Search , you will get a list of application notes . It helps!!
Tips: I got no doubt that for a new user you might stuck there whole day reading more than 5 times the same sentence , there's always something easier out there , don't just focus on one thing if you cant understand it move to another file if you think u still not that level to understand the application notes.
How to program Assembly language using MPLAB IDE??
1.Download MPLAB IDE from Microchip
2.Open MPLAB IDE
3.Go to Project>Project Wizard
4.Click Next into this windows:
5.Next to this for assembly language:
6.Give your project a name:
7.We are done for setting up a worksheet:-
8.Click on new file to get a new file:
9.Click on that untitled windows and go to file>save as:
10.Give your file a name ,remember that file must have extension of .asm or else your coding wont be able to recognize as assembly language.
11.Go to source file >right click on source file and select add files>browse for the place that you have save your .asm file previously.
12.Select the file that you had saved as .Asm and open.
13.At last your worksheet should be something like this :-
If you enter any valid instruction set for example movlw it will appear blue in color and comment will be green.
How you going to program C language using MPLAB IDE?
If you are using C language click HERE to see how to program using C language.
Third Phase:
Programming is always a headache when bump into troubleshooting code and here's what you learn the most from when you make mistake and try to troubleshoot.Enjoy this section since you cant avoid it , but you can ask for some little help from expert in forum:
They will mostly help you out what you want to know , bear in mind that dont throw the whole page of long coding to people and ask for troubleshoot . If you wan a fast solution extract the code that you dont have any resource to depend on anymore and ask people for help.They will most likely help you out with sincere heart.
Personally i like Electro-Tech as their member is very active , although some resource i cant get through them but they help me a lot more than i can ever imagine.
Here's a small little guide from my experience , if your microcontroller come out with some really weird result dont just search in your code but also your hardware.
- DO NOT LEFT /MCLR unconnected ,as floating will cause it to reset when noise is receive on the pin.
- Always use capacitor at where the pin your crystal is operating , as crystal is small actually small vibration when activate by microcontroller.Thefore a little noise will led to unusual output.
- Crystal should be attach on the power pin too (Vcc and Ground) to reduce noise too.
- Do not hold the microcontroller pin with your finger as electro static will kill it.
- Try not to keep deattach your microcontroller from testing board.
Don't Feel Upset When You Fail!
Happy Learning!
"Notice:Any broken link please inform me."
Sorry =( i forgot to save a copy of those URL of my blog list , once i change i dunno where it goes..so can you all at shoutbox there say hello and at the same time attach with URL..
Thanks for your effort.
Off-Topic
Oh ya my work got postpone =( , i am bored in home...20th next week tuesday only is my first day..hopefully i dont receive another postpone...
and
Have been so long i didn't come out with a picture attach post ..it must be very boring for you all..and i see the live-feed on the right most of them is from tech-savvy in google and reach my blog..how come T.T...Hello those tech-savvy people , maybe you can add me on my facebook there i dont reject people friend request.
Recently
I bought Forbes magazine , that's a great magazine!!
Entrepreneurs in Asia and World-wide businessman share their ideas and thought.. what inspire them to be such a successful person not only in wealth but take care of the globe that getting more and more unhealthy!
For Malaysia this magazine is only RM18.00 if u buy it from popular or any magazine store..They didn't pay me to advertise since my blog is not as popular as kennysia blog.So dont worry , i am here telling u the truth.
Yesterday night was a awkful night , i got so upset dunno why..
- Is it because i lost my direction ?
- I come across somebody message and make me feel so lonely up?
- hormone imbalance? lol...
Maybe is because i just open up too free to think about anything that's unnecessary!
Just cant stop thinking foolish thing that i feel that's idiotic...well well sometime people tend to be stupid.
Unexpected things always spike up suddenly that u will trap inside there ..i know my friend all is now very busy and some even feel very stress..why dont stop and think what's your today goal that u need to achieve??
What stressed actually is when u look it backward.
Desserts = 1/Stressed
Actually it help you to color up today with some bitter experience that you will learn from and this is a life-long skill that you obtain...It's a good deal when u learning something that's hard for you in present but u can use it in the rest of your life ?? Think about that deal.
Lets dont think about the pain ,enjoy what u will get after the pain!!
Just like doing physical training !! Want a bigger muscle must withstand those pain ...
Yipee...i wont stay in home for another 5 months anymore finally got people decide to hire me..Maybe the company is not as famous as intel for most of the people but it's quite famous in engineering sector though =)..erm actually they were the first 1 out of 4 prospective employer that gave me a call..
I got almost everything done but left something else i haven do yet...some register stuff like new account in CIMB (since i dont have any account there) , Photostate this and that...but what come to me the worse is that my shoes is in bad condition , my hair is quite long...i need to spend about RM100 for both hair and shoes? i mean for a proper shoes...and i left RM350 for this month =(..hopefully with some bread over my lunch someday can cover this month expenses.
other than that , i was dreaming to get macbook the cheapest 1...RM3699 on the net...since my dad decide to buy me another laptop so i no need to worry about my study laptop anymore..yup i am deciding to buy two laptops...lol! if my dad know it he will kill me =(...well see how it goes maybe i will buy tahoeII which is a RM1.5k awesome board..and yet my salary will be RM500 ..working from 8am-5pm hopefully what i learn can cover up the pay ..