Showing posts with label Softwares. Show all posts
Showing posts with label Softwares. Show all posts

Friday, 16 October 2015

PIC Microcontroller (Architecture, Features, Programming, Datasheet, Projects)

PIC MICROCONTROLLER

PIC stands for peripheral interface controller

Where as F stands for Flash it represents the type of memory used,
In 2000, Microchip introduced the PIC18 architecture.Unlike the 17 series,with a large number of device variants presently in manufacture. In contrast to earlier devices, which were more often than not programmed in assembly, C has become the predominant development language.


PIC18F4520

pic18f4520


Parameters of PIC18F4520 micro controller

Features of PIC18f4520


Pin Diagram Of PIC18F4520

pin diagram of pic18f4520



The 18 series inherits most of the features and instructions of the 17 series, while adding a number of important new features:


PIC18 uses flash memory so that a data can be saved and erased number of times as per user requirement, not only this the battery used is used to give clock to the device.

Features of PIC micro controller

  CPU


        Up to 10 MIPS Performance at 3V
        C compiler optimized RISC architecture
        8x8 Single Cycle Hardware Multiply

  System

       
        Internal oscillator support-31 kHz to 8MHz with 4xPLL
        Fail-Safe Clock Monitor- allows safe shutdown if clock fails
        Watchdog Timer with separate RC oscillator
        Wide operating Voltage range; 2.0V to 5.5V

 nanoWatt Power Managed Modes


        Run, Idle and SLEEP modes
        Idle mode currents down to 5.8uA typical
        Sleep mode currents down to 0.1uA typical 
   

 Analog Features


        10-bit ADC, 13 channels, 100K samples per second
        Programmable Low Voltage Detection Module
        Programmable Brown-out-Reset Module
        Two Analog Comparators multiplexing 

  Peripherals

        Master Synchronous Serial Port supports SPI™ and I2C™ master and slave mode
        EUSART module including LIN bus support
        Four Timer modules
        Up to 5 PWM outputs
        Up to 2 Capture / Compare 


Advantages


  1. Small instruction set to learn and implement
  2. PIC has RISC architecture
  3. Built-in oscillator with selectable speeds
  4. Easy entry level, in-circuit programming plus in-circuit debugging PICkit units available for less than $50
  5. Inexpensive microcontrollers
  6. Wide range of interfaces including I²C, SPI, USB, USART, A/D, programmable comparators, PWM, LIN, CAN, PSP, and Ethernet
  7. Availability of processors in DIL package make them easy to handle for hobby use.


Comparison between PIC and 8051



8051- if u want a cheap controller with basic functions then 8051 will suffice . It will be of great use in your low cost college projects.

PIC- Cheap , used in refrigerators and low budget projects .

8051 and PIC need multiple clock cycles per instruction. AVR and ARM execute most instructions in a single clock cycle.

8051 and PIC have limited stack space - limited to 128 bytes for the 8051, and as little as 8 words or less for PIC. Writing a C compiler for these architectures must have been challenging, and compiler choice is limited.



Real Time Applications and Projects of PIC

1) PIC can be used to design Data Acquisition System

2)Digital clock can be implemented using PIC

3)Frequency counter are another application

4)PIC can be used as Timers, counters

5)We can design a calculator using PIC


Download Datasheet of PIC18F4520

Check out how to use PIC microcontroller using PICKit 3 or Proteus.

You can also learn how to configure DSP Processor.




Check out Complete Interview Guide For BE

Thursday, 15 October 2015

How To Configure and Run DSP Processor

Digital signal processor (DSP)


Digital signal processor (DSP) is a special type of microprocessor (or a SIP block), with its architecture optimized for the operational needs of digital signal processing.


Digital Signal Processors (DSP) take real-world signals like voice, audio, video, temperature, pressure, or position that have been digitized and then mathematically manipulate them. A DSP is designed for performing mathematical functions like "add", "subtract", "multiply" and "divide" very quickly.


C6713DSK in CCSv5

C6713DSK in CCSv5



What is inside a DSP processor?



A DSP contains these key components:


  • Data Memory: Stores the information to be processed by processor
  • Program Memory: Stores the programs which the DSP will use to process data
  • Input/Output: Serves a range of functions to connect to the outside world
  • Compute Engine:It performs the math processing, accessing the program from the Program Memory and data from  Data Memory


Required Softwares

Download board support files from Spectrum Digital Website.
Unpack all files to C:\
Download CSL form TI website
Install it at C:\C6xCSL directory
Set all of jumpers on SW3 and SW1 to OFF
Connect USB then connect power

Run 6713SDKDiag.exe from C:\DSK6713\drivers to check emulator connection

Following is a step by step guide to setup a DSP processor using Non real steps CCS v5.3 DSK6713

Step 1
Click on ccs5.3.0 icon as shown below
How To Configure and Run DSP Processor

Workspace window will get open select as default or you can give your location.


How To Configure and Run DSP Processor

Close TI Explorer window


configure dsp processor

Create new target configuration
File--> new--> targetconfiguration

How To Configure and Run DSP Processor

Filename: test1.ccxml


configure dsp processor

Connection: spectrum digital DSK-EVM-eZdsp on board USB emulator

Board or device: TMS320C6713

Connection: spectrum digital dsk evm ezdsp on board usb emulator Board or device: tms320c6713

View--> targetconfiguration

target configuration

Right click on your target configuration window open at right side, set as sefault

configure dsp processor


It will jump from edit perspective to debug perspective.

Run --> connect target



configure dsp processor

Your target is connected.


Create  new project
File-->new --> ccs project

How To Configure and Run DSP Processor

Select as shown below.

dsp processor

Write the code in main.c file or copy paste.
Right click on project --> build project

How To Configure and Run DSP Processor

It will generate the .out file in debug folder.
Move from edit perspective to debug prospective.
It will generate the .out file in debug folder. Move from edit perspective to debug prospective.

Run --> load -->load program.

configure dsp processor

Browse project


Select Debug --> xyz.out

run dsp processor

Ok-->ok

run dsp processor

Run --> resume.

run dsp processor

See the out put on console.

configure dsp processor

To see graph.
Tools --> graph --> single time.
Selct as shown

run dsp processor

run dsp processor

Real time

It is same like non real but you need to add BSL and CSL file.
Copy real time codec code to main.c.
run dsp processor

Right click on project --> add files

dsp processor

C:\CCStudio_v3.1\C6000\dsk6713\lib\dsk6713bsl.lib

run dsp processor

C:\CCStudio_v3.1\C6000\csl\lib\csl6713.lib

run a dsp processor

Add header file for csl and bsl.
Right click on project properties --> include option
Add dir to #include click on green colour plus sign symbol.

C:\CCStudio_v3.1\C6000\dsk6713\include.
C:\CCStudio_v3.1\C6000\csl\include.

run dsp processor


Predefined symbol -->  pre-define Name
click on green colour plus sign symbol.
Type CHIP_6713 and save.

dsp processor

Now debug the code and  load the .out file to board same like non real procedure.

Possibility error

Install again and again
Disable antivirus or uninstall


Add gel files:
CCStudio_v3.1\cc\gel\DSK6713.gel

configure dsp processor


Add 
Linker command file : C:\CCStudio_v3.1\tutorial\dsk6713\hello1\hello.cmd
and
Run time support libarray: C:/CCStudio_v3.1/C6000/cgtools/lib/rts6700.lib

How To Configure and Run DSP Processor
Entc Engg. Powered by Blogger.