Saturday, March 29, 2008

Robonics - My Robotics Start Up

Heyy People
It has been a while since I wrote something here. I have been busy all these days.. Busy with what ???? ..
Well I have been working hard to launch my own company. What does the company deal with ?
What other than robotics (my passion). Presently I am have developed and manufactured some development board, programmers and a few mechanical parts. I hope to extend my catalog to lots of other parts.

Company Name
I have named my company ROBONICS.
etymology: Robo from Robotics and nics from electronics constitute ROBONICS.This name was suggested by my friend gopi.. I liked it and so named it.Some of my friends accused me for the name not being jazzy ... I should have added an X or Z. Well I like to keep it clean and simple .. I am happy with this name.

Why I started this company ?

  • One major reason being there arent any robotics company in Chennai , Hyd , Cochin that manufactures and sells kits. Of course there are many players in North India.
  • Second reason being, all the kits that you get online are costly which are sold at a huge margin.So I wanted to provide kits for students that is cheap as well as easy to use .(Budget is always a problem for we robotists)
Wish me good luck for my business to succeed guys and gals .. For I need you to for this business to succeed.

Shop
There is an online shopping cart that you can use to shop for products. Some of the very useful products that I would like to recommend is
Please do check out the website guys ..and wish me luck again.

Sunday, March 2, 2008

Knowing pic16f877 Interrupt Registers





<<<Previous Tutorial Next Tutorial>>>

INTERRUPTS IN 16F877A

The interrupt sources in PIC can be broadly classified into .
1.External interrupt
2.Internal interrupts .

There are totally 14 sources of interrupts in PIC16F877A .
  1. Timer0 overflow interrupt
  2. Timer 1 interrupt
  3. Timer 2 interrupt
  4. Capture compare interrupt ccp1.
  5. Capture compare interrupt ccp2.
  6. Comparator Interrupt
  7. USART Transmitter interrupt
  8. USART Receiver Interrupt
  9. Synchronous Serial Port interrupt
  10. EEPROM Write Interrupt
  11. Analog to Digital Converter interrupt
  12. Parallel slave port read write interrupt
  13. Bus collision interrupt
  14. External interrupt (RB0/INT0)
Starting with the registers .
The global register for the interrrupt is INTCON .The following tables show you the individual bits .














GIE

PEIE

TOIE

INTE

RBIE

TOIF

INTF

RBIF



The description of the individual bits are given below .The status of different interrupts when set as o and 1 .


























































BIT

NAME

WHEN SET 1

WHEN SET O

GIE

Global interrupt bit

Enable all

Disable all

PEIE

Peripheral interrupt enable bit

Enable all unmaskable peripheral
interrupts

Disable all
peripheral interrupts

TOIE

Timer 0 overflow interrupt enable bit

Enable

Disable

INTE

RB0/INT external interrupt
enable bit

Enable

Disable

RBIE

RB port change interrupt enable bit

Enable

Disable

TOIF

Timer 0 overflow interrupt flag

TMR0 reg overflows
































INTF

RB0/INT external interrupt flag

External interrupt occurs

No interrupt

RBIF

RB port change interrupt flag bit

One line changes its state from RB7 to RB4

No line changes


The first five bits are configuration bits and the next 3 lower bits are FLAGS .That will be set as 1 when the corresponding interrupt occours .It is the programmers responsiblity to clear those bits .It wont be cleared automatically .Its for the reson because if another interrupt occours while processing the previous interrupt it will lead to chaos .So the task is given to the programmer to clear the bits .



In addition to INTCON reg peripheral interrupt also has 4 more reg PIE1 , PIE2 corresponding to PIEX and PIR1 and PIR2 coressponding to PIRX.Let us see these registers in the next tutorials .







<<<Previous Tutorial Next Tutorial>>>














pic16f877a interrupt register config





<<<Previous Tutorial Next Tutorial>>>
PIE1 REGISTER
The Table for PIE1 configuration is given below .












PSPIE

ADIE

RCIE
TXIE
SSPIE
CCPIE1IE
TMR2IE
TMRA11E



Please take a look at the table to configure it according to your needs .For example PIE.6 corresponds to ADIE and setting it as 1 enables the A2D converter interrupt.


EX

PIE.6 = 1 ;











PSPIE























SSPIE






CCPIE1IE


















BIT

NAME

ENABLE

DISABLE
Parallel slave port read/write interrupt enable bit

1

0

ADIE

AD conveter interrupt enable bit

1

0

RCIE

USART receive interrupt enable bit

1

0

TXIE

USART transmit interrupt enable bit

1

0

Synchrous serial port interrupt
enable bit

1

0

CCP1 interrupt enable bit

1

0

TMR2IE

TMR2 to PR2 match interrupt enable bit

1

0

TMRA11E

TMR! overflow interrupt enable bit

1

0



















PIE2 REGISTER














---

---

---

EEIE

BCLIE

---

---

CCP2IE








































NAME

ENABLE

DISABLE

EEIE

EEPROM write operation interrupt enable bit

1

0

BCLIE

Bus collision interrupt enable bit

1

0

CCP2IE

CCP2 interrupt enable bit

1

0



EEPROM Bus collision and CCP2 interrupt enable bit are available in PIE2 register .All other bits are
kept clear in this register






<<<Previous Tutorial Next Tutorial>>>

PIC16f877a PIR1 and PIR2 Configuration .





<<<Previous Tutorial Next Tutorial>>>

PIR1 REGISTER

The bits are listed below .


PSPIF









ADIF
RCIF
TXIF
SSPIF
CCPIE1IF
TMR2IF
TMRA11F





























































BIT

NAME

ENABLE

DISABLE

PSPIF

Parallel slave port read/write interrupt flag

1

0

ADIF

AD conveter interrupt flag

1

0

RCIF

USART receive interrupt flag

1

0

TXIF

USART transmit interrupt flag

1

0

SSPIF

Synchrous serial port interrupt
flag

1

0

CCPIE1IF

CCP1 interrupt flag

1

0

TMR2IF

TMR2 to PR2 match Interrupt flag

1

0

TMRA11F

TMR! overflow interrupt Flag

1

0



PIR2 REGISTER

The Configuration bits are listed below .Take a look at it to understand .





---










---

---

EEIF

BCLIE

---

---

CCP2IE





























BIT

NAME

ENABLE

DISABLE

EEIF

EEPROM write operation interrupt flag

1

0

BCLIF

Bus collision interrupt
flag

1

0

CCP2IF

CCP2 interrupt flag

1

0





<<<Previous Tutorial Next Tutorial>>>