Google

Sep 1, 2015

Where to buy a raspberry Pi in india ?

Folks,


now a days its very easy to build cool project with raspberry pi which is a complete computer in a size of a credit card. and for your engineering projects you can use this wonderful product and build lot of interesting stuff like

1. personal media server at home
2. home automation
3. agriculture motor automation etc etc.
we will discuss on more of these projects in future but this post is about where we can buy the raspberry pi india,

option 1 buy it from amazon india. 
http://www.amazon.in/Raspberry-Pi-Model-Revision-512MB/dp/B009SQQF9C


option 2 : buying it from local distributors in india
there are few distributors in india who also supply raspberry pi india below are the list you can check out there website for the price and address 

Address: #34, 1st Floor, Sapthagiri Layout, Kothnur Dinne Main Road, Behind TR Hospital, 8th Phase, JP Nagar, Bengaluru, Karnataka 560076
Phone:1800 200 9993
price : 2635 for Model B+


kitsnspares
Online store: price is around

RS components
online store : price is around 2900 for model B+

PotentialLabs
online store : price is around 2395 for model B+


Option 3 buy from US and ship it to india,

if you are looking for some custom component something that is only available in amazon US or element14 in US you can always use services like http://www.borderlinx.com/IN/en to buy from US and ship them to india.

please do share your experience with buying raspberry pi india in the comments section


Mar 10, 2010

PWM with 89S52

Here is the program for Pulse width modulation PWM on basic for 89s52.

You could generate pwm using the following psedocode

#define high_period
#define low_period

main()
{
!!Code to initiate the timer;
!!Timer counter register value = high_period;
!!set port pin high
!!start timer
while(1);
}

interrupt void time_interrupt_routine(void)
{
if(port pin is high)
!!Timer counter register value = low_period;

else
!!Timer counter register value = high_period;

!!Toggle port pin
!! start timer;
}

Here high_period + low_period gives the time period in terms of clock cycle and

high_period/(high_period + low_period) *100 gives the dutycycle.

Mar 5, 2010

How to access R0 to R7 registers in Keil C?

you can use the following Program to access R0 to R7 registers in Keil C


{

unsigned char R0Val;

_asm

MOV A, R0
MOV _R0Val, A

_endasm

}

OR

{

unsigned char R0Val;

#pragma ASM

MOV A, R0
MOV _R0Val, A

#pragma ENDASM

}

C variables have to be prefixed by '_' or underscore character, to be accessible in the assembly section of the C code.

Hope this helps.

Feb 28, 2010

Program to initialise the LCD in 4 bit mode using PIC microcontroller

It was for 16F72 at 4Mhz written in cc5x. LCD is connected to PORTB.RS at RB7,RW at RB1,EN at RB6. DB7 at RB2,DB6 at RB3, DB5 at RB4, and DB4 at RB5. A function delay_ms() is used , which is not shown here.

code will work for 2x16 character LCD modules.

void lcdw(unsigned char m)
{
PORTB.2=m.7;
PORTB.3=m.6;
PORTB.4=m.5;
PORTB.5=m.4;
en=1;
nop();
nop();
en=0;
}

void nbw(unsigned char m)
{
PORTB.2=m.7;
PORTB.3=m.6;
PORTB.4=m.5;
PORTB.5=m.4;
en=1;
nop();
nop();
en=0;
PORTB.2=m.3;
PORTB.3=m.2;
PORTB.4=m.1;
PORTB.5=m.0;
en=1;
nop();
nop();
en=0;
}

void goadr(unsigned char a)
{

rs=0;
nbw(0x80 + a);
delay_ms(5); // delay of 5msec

}


void main()
{
................

TRISB=0;
PORTB=0;
rw=0;
rs=0;
lcdw(0x28); // lcdw function is only used once to initialise the LCD to 4 bit mode.
delay_ms(5);
nbw(0x28);
delay_ms(5);
nbw(0x0c);
delay_ms(5);
nbw(0x06);
delay_ms(5);
nbw(0x01);
delay_ms(5);
goadr(0x02);
rs=1;
nbw('a'); //displays the character "a" at location 0x02
nbw('b'); //displays the character "b" at location 0x03
.........................


}

Feb 25, 2010

Program for multiplexing of led displays for pic microcontrollers

Suppose you want to design the ac digital voltmeter rang up to 0-300v or above, by using any pic 8-bit mcu, and want to use 3, 7-segment display for it then there can be a problem as to how do you indicate such large value on display

then you can go with the following approch

use BCD to 7 segment converter, so that only 4 bits can be used to control a single 7 seven segment display..... so in total u need 12 output lines. you can get 12 output bits by using 2 different ports of any suitable 8 bit microcontroller. link to one such converter http://www.ee.washington.edu/stores/DataSheets/74ls/74ls47.pdf

use 7 bits from one port for all 3 displays and use 3 other bits to select led's this is done very fast so human eye can not make out that the displays are glowing sequencially and not continously.
here is sample code for pic

#include
#include

void DisplayNumber( unsigned int number );

void main()
{
trisb = 0;
trisa = 0xFF;

unsigned int randNumb = 0;

while( 1 )
{

while( porta.0 == 0 ) // wait for key pressed
DisplayNumber( randNumb ); // display number to keep display refreshed

// while key pressed increment counter
// Number will be random based on how long input is turned on
while( porta.0 == 1 )
{
randNumb++;
if( ++randNumb > 9999 )
randNumb = 0;
}

// display a series of random numbers so it looks like we are
char j;
for( j = 0; j < x =" rand();" i =" 0;" i =" 0x01;" i =" 0b1000;">>= 1 )
{
digit = number % 10;
number /= 10;

portb = digit & 0x0F;
portb = (digit & 0x0F) | (i <<>

Feb 20, 2010

version control system for keil & MPLAB.

Hi when you are working on large project which involve large number of programs and many developers work at same thing then thing will become hard to manage and the project may Fail.

so when you are dealing with Such kind of progects while developing Microprocessor microcontroller Projects it is all ways better to use CVS Code version system or Version control sytems.It is the best way to share code, you could do the same in MATLAB, Keil or MPlab but it is much efficient to use SVN.



Please find the bellow video to learn CVS/SVN

Tutorial: using tortoisesvn, subversion on windows from Mark Guzman on Vimeo.