Sunday 19 January 2014

How to calculate Modbus RTU CRC - CRC Calculator using Python

#-------------------------------------------------------------------------------
# Name:        CRC Calculator
# Purpose:      For modbusRTU CRC calculation
#
# Author:      Parthi
#
# Created:     04/01/2013
# Copyright:   (c) 2013
# Licence:     <your licence>
#-------------------------------------------------------------------------------

#To get the bytes from user
s = raw_input("Enter the bytes: \n Make sure that the bytes going to enter are in decimal and not in HexaDecimal:\n")
data = map(int, s.split())              #To split the bytes after every SPACE

print "The Entered Bytes are:",data
n=len(data)                             #To find the Bytes length
print "The Total Byte length is:",n

temp=0xFFFF;

i=0
while(i<n):
    temp=temp ^ data[i];                #ExOR FFFF and the actual byte
    j = 0
    while(j<8):                         #For Eight Right shift

        flag=temp & 0x0001;             #To get the Carry Flag
        temp=temp >> 1;                 #To shift 1 bit to the right

        if (flag==1):
            temp=temp ^ 0xA001;         #ExOR with A001, if Flag is 1
        j=j+1;

    i=i+1;

temp2=temp >> 8;                        #Reverse Byte Order
temp=(temp << 8) | temp2;
temp &= 0xFFFF;

print "The Final CRC is:"
print hex(temp)
-----------------------------------------------------------------------------------------------------------




Thursday 16 January 2014

Education Loan EMI Calculator

Link to download as excel file Sheet1
.
.
Education Loan EMI Calculator
.
.
.
Total Loan Amount:200000
.
Interest Rate:14.50.012083333333333
.
Period in years:672 [1]
.
.
Monthly EMI:4174.88535033251
.
Total Loan Repayment:300591.745223941
.
[1] Author: Period in months

Monday 1 July 2013

Run Android Apps on Windows XP/Vista/7/8 & Mac

 Hi, i like to introduce here about the Bluestack. It is an "Android Emulator".

First what is the diff b/w Simulator & Emulator?
I think, many of us come across a word "Simulator".

SIMULATOR: A simulator is a model for analysis.
EMULATOR: An emulator can replace the original for 'real' use.

A Virtual PC emulates a PC.
If a flight-simulator could transport you from A to B it would be a flight-emulator.


Download the Bluestack for Windows 8 here.
Download the Bluestack for Windows XP/Vista/07 here.






Just install & enjoyyy...

Wednesday 2 January 2013

ஸ்டார்ட் மியூசிக்!: பவர்ஸ்டாரையே அதிர வைத்த புது நடிகர்...

ஸ்டார்ட் மியூசிக்!: பவர்ஸ்டாரையே அதிர வைத்த புது நடிகர்...: பவர்ஸ்டார் என்றாலே இன்று தெரியாத ஆளே உலகில் இருக்க முடியாது, அந்தளவிற்கு தன் அழகாலும், நடிப்பாலும், நடனத்தாலும் மக்கள் அனைவரையும் கட்டிப்போ...