viernes, 21 de agosto de 2009

First Page


Hi Visitors,

Besides all tech stuff in this blog i thought that I should have a section for Myself.
This is where i want to write few diary pages filled with my life experiences,any nostalgic dream,or my opinion on a issue which is effecting my country INDIA progress and it's prosperity.

I found that this could be a place where i can interact with the world as a Friend and try to share my feelings and viewpoints and attitude towards life.

To make this section really happening i would also like you to participate through your valuable comments and place your viewpoint too so that maybe we can all learn some Psalm of Life ... morals which make us a better human being.




I found this very interesting widget which would bring me closer to the visitors :





Please feel free to ask or give suggestions.I am always anxiously waiting for them.

jueves, 13 de agosto de 2009

Timer,Usart,Interrupt Basic Steps

While coding for timers Usart etc there are some steps that are always rather generally taken in order to initialize them.

I have tried to just summarize these basic steps for the beginner which they can adopt while writing code for AVR (i use ATmega 8)

Timer

1. Set the prescalar TCCR0 (example using timer0)
2. Enable the timer interrupt TIMSK timer mask register
3. Enable global interrupts
4. Calculate how often OVF interrupt is thrown as timer OVF is periodic in nature


Usart

INIT

1. Set the baud rate register UBRR is 16 bit
2. Enable Receiver and Transmitter UCSRB also enable the RXCIE or TXCIE or both if interrupts are required.
3. Set frame format for assynchronous communication UCSRC.
that is if you are using parity bits or not,which form of start & stop bit are you trying to incorporate


Transmit
1. UCSRA&(1<<UDRE). If done than store the data to be transmitted in the UDR(usart data register).

Receive
1. Check if receive is complete if yes then store the data from the UDR to any variable

further if using the interrupts related to usart events then make sure you enable the global interrupt by SEI();


Disabling the interrupt before atomic statements.

1. Method is to store the status or condition of the MCU by saving the SREG into any 8 bit variable
2. Use _CLI() to clear global interrupt enable bit
3. Restore previous state form variable used in 1.


PWM hardware based

1. Initialize all the timer in the desired pwm mode and set whether you want inverting or non-inverting pwm.
2. Set the prescalar in TCCR1B.wgm13=0 means normal mode.That is timer would start then OVF and then restart from BOTTOM.
3. Set OCR1A/B a 16 bit register
4. Duty cycle is dependent only on OCR values




viernes, 24 de julio de 2009

Counter using atmega 8

Enjoyed previous videos???
I programmed atmega8 along with my friend divya alok (class mate) to display numbers (0-9) on a 7 Segment Led.

This is also based on simple I/O pin control




I Hope that you liked it.
Good Day

My First Website using JAVA J2EE & Javascript

I have made a website using jsp & servlets.This was built by me only for educational purpose i.e Learning By Doing process.




Features include :

1. JavaScript for Client Side Validations.
  • This makes filling long & tedious looking forms to be filled in seconds.As you can see in the video below, using JavaScripts has made Registration & Login page page more User-friendly
  • I have used it to catch some events such as onblur, onfocus etc thrown by the form elements.
2. Ajax
  • Ajax makes everything so easy for the client/visitor.It communicates with the server in the background makes available all the data required either from a file or database and makes it available to the user.This all happens without refreshing or loading the page!!!
3. Jsp & Servlets
  • This is the backbone of whole project.These are the server pages which listen to the request from the client(actually web-browser) and accordingly is generating a response
  • For example - when the user clicks submit on Login page.It is the server page JSP that communicates to the database using an underlying bean ( a java class file).If the user is found then a session is created & attributes are set.Finally user is again moved to the main page.
4. CSS or style tag
  • These are used extensively to apply a desired design format on the entire JSP page.
  • Best part - In order to change the style/appearance of elements in a page you have two options - i) You would have to place standard html tags in each of the required places throughout the page OR ii)The better way is to set the style for the element types in one place which would effect the whole page.Futher one can have external css which makes the style format once set to be used in many pages.
5. File data Handling
  • For Post file data handling has been done which can be used to post data on the website.
6. Jsp & Html
  • This was the Best feature incorporated by SUN professionals which makes java web development extremely simple.
  • Feature is - you can mix up HTML & JAVA Scriptlets any number of times without hesitation.
  • The data you see on the home page which i call posts are actually dynamically read from the disk and presented to you in the form of a table (with border = 0)
7. Flash
  • I may not be a pro in using Macromedia flash.But i managed to make the text effects you see in the banner on the top.I have embedded these swf(s) in my blog too.They look COOL!!! Isn't it
8. Session Handling
  • It is very important to keep track information about the visitor/user visiting your blog.
  • For example - I don't wan't a person to be able to post data to my website unless and until he has registered himself to my website and has Loggined into the website.This is integral for admin management of the website.
  • can be done by session handling,cookies,url rewriting,hidden text field.I have used first two i.e Session creation & writing cookies to the client.
If you have any problems/suggestions please let me know
harshtripathi.blogspot.com

domingo, 19 de julio de 2009

Q-2 You need to make your Website scalable.What is meant by Scalable?

If a Website is scalable it means that even if Load increases(large no. of client are trying to access the server) it does not substantially effect the performance & speed of request-response routine.

One of the frequently used technique for this purpose is Caching.

Caching Basics

Retrieving data from the database is time-expensive whereas doing the same from a File/Memory(HashMap) is fast.Therefore it helps the server to deliver the resource quickly.

Caching is done under following conditions -

1. For the data which is frequently demanded from the clients
2. Admin of the website is making changes in the database.Therefore cached data must also be updated.
3. Caching is done for the first request.next time a client tries to access the data, it is fetched from the cached file and not from the database

viernes, 17 de julio de 2009

Interview Questions ( One question per Post )

From now on i will be posting some very basic questions(one question per post) when it comes to Website Development or those asked in an Interview.I thought that this would be the best way to learn things quickly for a newbie.

I have given the answer as per my understanding & would not be responsible for any harm to you with this inf.

Enjoy!!!!...............................................

Q-1 What is HTTP Protocol so much talked about?

Hypertext Transfer Protocol is a Stateless protocol i.e there is no information about which client is making the request.A request is sent by the Client to the Server & Server looks for the resource through buissness logic/Data Model.Then it sends the data back as a response to the Client.It runs on top of TCP/IP protocols and uses basic request-response routine for srving the client.TCP - Transfer Control Protocol is responsible to ensure that file sent from one network node to another ends up as a complete file.Whereas IP - Internet Protocol has the responsibility for routingthe packet of data for reaching it's proper destination.

lunes, 13 de julio de 2009

ROBOTICS BOOK DOWNLOAD 150+


ROBOTICS

Ever found interest in building your own ROBOT the visit the following link.

Download this text file containing to 150+ books

I am in no way hosting links given in the text file.If it violates any norms please inform me.I don't have much inf with copyrights.Thanks for your co-operation