????? ??? ??????? ????? LED ??? ???????? ????

Microcontroller Topics
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

????? ??? ??????? ????? LED ??? ???????? ????

Post by Rksk » Sat May 04, 2013 7:28 pm

????? ???? ?? ?? ???? ????? ????? ????? ?????. ?? ?????? ????? ????? ??? ???????? ???????????????????? ???????? ??? ????? ?? ?? ?????? ??? ???????? ?????? ???????. ???? ???????????????????? ????? ????? ???? ????? ???? ??. ????? ????? ???????? ???????? ??? ??????.

01. PIC programmer ????
02. MikroC IDE ??


PIC programmer ????? ???? ??? ???? ???? ?? ???????????????????? ?? ?? ???????. ????? CD write ???? ???. ? ???? ???? ????? ????? ?????? ???? JDM programmers. ?? ?????? ??? ????? ????????? Serial port ?? ???? ??? ???? ???? ?????? ??? ??? ????????? ??. ????? USB ???? ??????? ??? PICKIT2 ??? ?????? ????????? ???? ?????? ???????.
(???? ?????? ??????? ?????? ?? ??? ?????)

? ??? MikroC IDE ?? ??????? ?????? ??????? http://www.mikroe.com/mikroc/pic/ ???????.


???? ??? ????? ??? ????????. ?? ?????? ???????? ?????? PIC16F628A ???? MicroChip PIC ?????? ???? ???????????????????? ??. ???? ???? 18?? ????? ??? ??? ??????? 180?? ??? ??????.

?? ???? ???? ???? ???? ????. ?? ???????? ????? ?????? ???? ????. C ?????? ????? ???? ??? ??? ??? ???? ??????.

Code: Select all

int i;
  
void main(){
  TRISB = 0;
  PORTB = 0;

  
  do
  {
    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(!PORTB.B7);

    }

    for (i = 0; i < 6; i++)
    {
      PORTB = 128;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(!PORTB.B0);

    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(!PORTB.B7);

      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(!PORTB.B0);
    }

  
  }while(1);

}

int i; ??? ??? ????? ?????? ??? ??? C ????? ???????

Code: Select all

void main(){
...
...
}
????? ??? ????? ???? ?????? ??? ??? ??????? ?????? ????? ?????. (???? ??? ???? ??? ???? function ???? ????? ???? ??)


TRISB = 0; ?????? ?????? PORTB ???? ???? 8? output ?????? ???? ??? ??.
PORTB = 0; ?????? ?????? PORTB ???? ???? 8? off ???????? ??? ??.

Code: Select all

do
{
...
...
}while(1);
?????? ?????? {} ????? ??? ????? ??? ???? ???? ?? ???? ???? ??????????? ?????????? ?????. ??? ?????? ??? ???????? ?????? ??? ???? ??? ?????? ??? ??? ????, ????? ??? ???? ??????????? ???? ????????? ??????.

???? ???? ???? ??? ?????? ?????.

Code: Select all

for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(!PORTB.B7);

    }
?? ???????? ???????? ????????? ?????? ????? ??????. ?????? ?????? ?? ?????? ???? ????? ?????? ?? ??. ?? ??? ???? ?????? ?????? ?? ??? ?? ???? ????????? ???? ??? ???? ?? ??? ???? ???? ?? ?????? ??? ????.


???? ???? ?????? ????? ??? ???????, ????? ?? ?????? ???????? ??????? ??????? ??? ????????.

Code: Select all

    for (i = 0; i < 6; i++)
    {
      PORTB = 0b10000001;
      Delay_ms(150);
      PORTB = 0b01000010;
      Delay_ms(150);
      PORTB = 0b00100100;
      Delay_ms(150);
      PORTB = 0b00011000;
      Delay_ms(150);
    }
??????

Code: Select all

for (i = 0; i < 6; i++)
{
...
..
}
????? ?????? {} ????? ??? ????? ????? ???? ?? ??? ???? ??? ??? ????? ??????????? ???? ??. ?? ??? ????? ?????? ??? ??? ?????? ??? 6?? ??????. ?? ??? ?????? ?????? ?? ???????? ??? ??? ???? ?????? ???? ???? ???? ?? ????? ????? ???????.

???? ???? PORTB = 0b10000001; ???? ??? ?????. 0b10000001 ??????? 10000001 ???? ???? ????? ???????? C ???? ???? ?????. ???? 1,0 ????? ?????? PORTB ?????? 8 (PIC ??? ??? 6???13 ????? ???? 8), on/off ?????.
PORTB = 0b00000001; ???? ???????? RB0 (6???? ???? ??) ?????? ??? ????.
PORTB = 0b10000000; ???? ???????? RB7 (13???? ???? ??) ?????? ??? ????.
PORTB = 0b10100000; ???? ???????? RB7 ?? RB5(13 ?? 11 ???? ???) ?????? ??? ????.
? ?????? 1,0 ????? ???????? ?? ??????? output8 ????? ?????? ???????.


Delay_ms(150); ????? ?????? ???? ????? 150 ?????? ????? ???????. ? ??????? ??? ????? ???????? ????? ?????? outputs ??? ?????? ?????. ???? ????? 150?? ????? ??? ???? ??? ?????? ???. ????? ??? ?????? outputs ????? ???? ???? ?? ???? ???? ????? ????????. 150 ?????? ???? ?? ???????? ??? ????? ???? ????? ?????? ???????.

Code: Select all

    for (i = 0; i < 10; i++)
    {
      PORTB = 0b00001111;
      Delay_ms(250);
      PORTB = 0b11110000;
      Delay_ms(250);

    }
????? ???????? ?????? ???? ????? 250?? ???? PIC ??? ??? 6???13 ????? ???? 8?? ???? ???? ??? ???????? ????? ?? ????? ???? ????? ??? ???? 10?????? ??????, ??? ????? ???.

?? ?? ?????? ???? ??? ????????. programing ???? ?????? ??? ???? ???? ??? :D ??? ?????? ??? ????? ?????? ???? ????? ???? ???.



?? ?????? ???? ?? ????? ??? ????? (??? ??? ???? ??????), ???? MikroC ??????????? ?? ?? ???????? test ?? ?????? ?? ?????? ?? Proteus file ??. zip file ?? ??? ?????? ??.
16F628A LED Pattern.zip
(21.25 KiB) Downloaded 506 times
diagram.gif
diagram.gif (7.15 KiB) Viewed 10816 times



My example code for readers

Code: Select all

int i;
  
void main(){
  TRISB = 0;
  PORTB = 0;

  
  do
  {
    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(!PORTB.F7);

    }

    for (i = 0; i < 6; i++)
    {
      PORTB = 128;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(!PORTB.F0);

    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(!PORTB.F7);

      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(!PORTB.F0);
    }







    for (i = 0; i < 6; i++)
    {
      PORTB = 3;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(PORTB != 128);

    }

    for (i = 0; i < 6; i++)
    {
      PORTB = 192;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(PORTB != 1);

    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 3;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(PORTB != 128);
      
      PORTB = 192;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(PORTB != 1);
    }









    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      PORTB = 3;
      Delay_ms(100);
      PORTB = 7;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(PORTB != 128);

    }

    for (i = 0; i < 6; i++)
    {
      PORTB = 128;
      Delay_ms(100);
      PORTB = 192;
      Delay_ms(100);
      PORTB = 224;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(PORTB != 1);

    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 1;
      Delay_ms(100);
      PORTB = 3;
      Delay_ms(100);
      PORTB = 7;
      Delay_ms(100);
      do
      {
       PORTB = PORTB<<1;
       Delay_ms(100);
      }while(PORTB != 128);
      
      PORTB = 128;
      Delay_ms(100);
      PORTB = 192;
      Delay_ms(100);
      PORTB = 224;
      Delay_ms(100);
      do
      {
       PORTB = PORTB>>1;
       Delay_ms(100);
      }while(PORTB != 1);
    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 0b10000001;
      Delay_ms(150);
      PORTB = 0b01000010;
      Delay_ms(150);
      PORTB = 0b00100100;
      Delay_ms(150);
      PORTB = 0b00011000;
      Delay_ms(150);
    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 0b00011000;
      Delay_ms(150);
      PORTB = 0b00100100;
      Delay_ms(150);
      PORTB = 0b01000010;
      Delay_ms(150);
      PORTB = 0b10000001;
      Delay_ms(150);
    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 0b10000001;
      Delay_ms(150);
      PORTB = 0b01000010;
      Delay_ms(150);
      PORTB = 0b00100100;
      Delay_ms(150);
      PORTB = 0b00011000;
      Delay_ms(150);
      PORTB = 0b00100100;
      Delay_ms(150);
      PORTB = 0b01000010;
      Delay_ms(150);
      PORTB = 0b10000001;
      Delay_ms(150);
    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 0b00000001;
      Delay_ms(100);
      PORTB = 0b00000010;
      Delay_ms(100);
      PORTB = 0b00000101;
      Delay_ms(100);
      PORTB = 0b00001010;
      Delay_ms(100);
      PORTB = 0b00010100;
      Delay_ms(100);
      PORTB = 0b00101000;
      Delay_ms(100);
      PORTB = 0b01010000;
      Delay_ms(100);
      PORTB = 0b10100000;
      Delay_ms(100);
      PORTB = 0b01000000;
      Delay_ms(100);
      PORTB = 0b10000000;
      Delay_ms(100);
    }


    for (i = 0; i < 6; i++)
    {
      PORTB = 0b00000001;
      Delay_ms(100);
      PORTB = 0b00000010;
      Delay_ms(100);
      PORTB = 0b00000101;
      Delay_ms(100);
      PORTB = 0b00001010;
      Delay_ms(100);
      PORTB = 0b00010100;
      Delay_ms(100);
      PORTB = 0b00101000;
      Delay_ms(100);
      PORTB = 0b01010000;
      Delay_ms(100);
      PORTB = 0b10100000;
      Delay_ms(100);
      PORTB = 0b01000000;
      Delay_ms(100);
      PORTB = 0b10000000;
      Delay_ms(100);
      PORTB = 0b01000000;
      Delay_ms(100);
      PORTB = 0b10100000;
      Delay_ms(100);
      PORTB = 0b01010000;
      Delay_ms(100);
      PORTB = 0b00101000;
      Delay_ms(100);
      PORTB = 0b00010100;
      Delay_ms(100);
      PORTB = 0b00001010;
      Delay_ms(100);
      PORTB = 0b00000101;
      Delay_ms(100);
      PORTB = 0b00000010;
      Delay_ms(100);
     }




    for (i = 0; i < 6; i++)
    {
      PORTB = 0b10000000;
      Delay_ms(100);
      PORTB = 0b01000000;
      Delay_ms(100);
      PORTB = 0b10100000;
      Delay_ms(100);
      PORTB = 0b01010000;
      Delay_ms(100);
      PORTB = 0b00101000;
      Delay_ms(100);
      PORTB = 0b00010100;
      Delay_ms(100);
      PORTB = 0b00001010;
      Delay_ms(100);
      PORTB = 0b00000101;
      Delay_ms(100);
      PORTB = 0b00000010;
      Delay_ms(100);
      PORTB = 0b00000001;
      Delay_ms(100);
    }



    PORTB = 0;
    for (i = 0; i < 6; i++)
    {
      PORTB = ~PORTB;
      Delay_ms(200);
    }

  
  }while(1);

}


?? ?????? ?????, ???? ????? ?????? ????? ???????? http://www.youtube.com/playlist?list=PL19228A60DD360B81
*MikroC IDE ??? ??? ??? ??????? ???? ??????.
http://www.youtube.com/watch?v=FTgN6MCahac


??? ??? ????? ????? ??????? ???. ?? ?????? ?????. :biggrin:
User avatar
nwclasantha
Posts: 75
Joined: Wed Apr 24, 2013 12:57 am
Location: Malabe

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by nwclasantha » Sat May 04, 2013 8:11 pm

THE SIMPLE EXPLANATION TO YOUR CODE AS A EXTRA CONTRIBUTION PLEASE..!

Lower nibble last,shifted to left by 1 place and assigning new PORTB Value until the loop will be end

PORTB = PORTB<<1;


???? ?????????? ???? ??? ?? ???? ..
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by Rksk » Sat May 04, 2013 9:23 pm

nwclasantha wrote:THE SIMPLE EXPLANATION TO YOUR CODE AS A EXTRA CONTRIBUTION PLEASE..!

Lower nibble last,shifted to left by 1 place and assigning new PORTB Value until the loop will be end

PORTB = PORTB<<1;


???? ?????????? ???? ??? ?? ???? ..
:D http://www.cprogramming.com/tutorial/bi ... ators.html

Thank you for the reply.
- Rksk
User avatar
nwclasantha
Posts: 75
Joined: Wed Apr 24, 2013 12:57 am
Location: Malabe

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by nwclasantha » Sat May 04, 2013 11:15 pm

Download Full PICkit Software+PCB+Firmware+Components List+Circuit
PICkit Software+PCB+Firmware+Components List+Circuit.rar
The PICkit 2 Programmer Application v2.61 provides programming support for these devices,

PICkit 2 Programmer Application v2.61 provides programming support for the following devices with the latest device file:

Baseline Devices

PIC12F519, 526
PIC16F54, 57, 59

Midrange Devices

‘LF’ versions of all devices are also supported

PIC10F320, 322
PIC12F617
PIC12F752, HV752
PIC16F627, 628
PIC16F72, 73, 74, 76, 77
PIC16F707
PIC16F720, 721
PIC16F722A, 723A
PIC16F84A

Enhanced Midrange Devices

‘LF’ versions of all devices are also supported

PIC12F1822
PIC12F1840
PIC16F1503, 1507, 1508, 1509
PIC16F1516, 1517, 1518, 1519
PIC16F1526, 1527
PIC16F1782, 1783
PIC16F1823, 1824, 1825, 1826, 1827, 1828, 1829
PIC16F1847
PIC16LF1902, 1903, 1904, 1906, 1907
PIC16F1933, 1934, 1936, 1937, 1938, 1939
PIC16F1946, 1947

PIC18 Devices

‘LF’ versions of all devices are also supported

PIC18F23K20, 43K20
PIC18F13K22
PIC18F23K22, 24K22, 25K22, 26K22
PIC18F43K22, 44K22, 45K22, 46K22
PIC18F26K80

PIC24 Devices

PIC24F04KA200, 04KA201
PIC24FJ32GA102, 32GA104
PIC24FJ32GB002, 32GB004
PIC24FJ64GA102, 64GA104
PIC24FJ64GB002, 64GB004

dsPIC33 Devices

dsPIC33FJ64GP206A, 64GP306A, 64GP310A
dsPIC33FJ64GP706A, 64GP710A
dsPIC33FJ128GP206A, 128GP306A, 128GP310A
dsPIC33FJ128GP706A, 128GP710A
dsPIC33FJ256GP506A, 256GP510A, 256GP710A

PIC32 Devices

PIC32MX320F032H, 320F064H
PIC32MX320F128H, 320F128L
PIC32MX340F128H, 340F128L
PIC32MX340F256H
PIC32MX340F512H
PIC32MX360F256L, 360F512L
PIC32MX420F032H
PIC32MX440F128L, 440F128H
PIC32MX440F256H
PIC32MX440F512H
PIC32MX460F256L, 460F512L

KEELOQ® HCS Devices

HCS200, 201
HCS300, 301, 320
HCS360, 361, 362

11 Series Serial EEPROM Devices

11LC/AA010
11LC/AA020
11LC/AA040
11LC/AA080
11LC/AA160

24 Series Serial EEPROM Devices

24LC/AA/C00
24LC/AA01B, 02B, 04B, 08B
24LC/AA16B, 32A
24LC/AA/FC64, 128, 256, 512
24LC/AA/FC1025

25 Series Serial EEPROM Devices

25LC/AA010A, 020A, 040A
25LC/AA080A, 080B, 160A, 160B
25LC/AA320A, 640A
25LC/AA128, 256, 512, 1024

93 Series Serial EEPROM Devices

93LC/AA/C46A, 46B, 46C
93LC/AA/C56A, 56B, 56C
93LC/AA/C66A, 66B, 66C
93LC/AA/C76A, 76B, 76C
93LC/AA/C86A, 86B, 86C

MCP250xx CAN Devices

MCP25020, 25025
MCP25050, 25055

Read More: http://www.microchip.com/stellent/idcpl ... e=en027813

Baseline Devices

PIC10F200*, 202*, 204*, 206*
PIC12F508*, 509*
PIC16F505*
- Above use AC162059 ICD header & AC164110 adapter.
PIC10F220*, 222*
PIC12F510*
PIC16F506*
- Above use AC162070 ICD header & AC164110 adapter

Midrange Devices

‘LF’ versions of all devices are also supported

PIC12F609*, HV609*
- Use AC162083 ICD header & AC164110 adapter.
PIC12F615*, HV615*
- Use AC162083 ICD header & AC164110 adapter.
PIC12F629*, 675*
- Use AC162050 ICD header & AC164110 adapter.
PIC12F635*, PIC16F636*
- Use AC162057 ICD header & AC164110 adapter.
PIC12F683*
- Use AC162058 ICD header & AC164110 adapter.
PIC16F610*, HV610*
- Use AC162083 ICD header & AC164110 adapter.
PIC16F616*, HV616*
- Use AC162083 ICD header & AC164110 adapter.
PIC16F627A*, 628A*, 648A*
- Use AC162053 ICD header & AC164110 adapter.
PIC16F630*, 676*
- Use AC162052 ICD header & AC164110 adapter.
PIC16F631*, 677*, 685*, 687*, 689*, 690*
- Use AC162061 ICD header & AC164110 adapter.
PIC16F639*
- Use AC162066 ICD header & AC164110 adapter.
PIC16F684*
- Use AC162055 ICD header & AC164110 adapter.
PIC16F688*
- Use AC162056 ICD header & AC164110 adapter.
PIC16F716*
- Use AC162054 ICD header & AC164110 adapter.
PIC16F722, 723, 724, 726, 727
PIC16F737, 747, 767, 777
PIC16F785*, HV785*
- Use AC162060 ICD header & AC164110 adapter.
PIC16F87, 88
PIC16F818, 819
PIC16F870, 871, 872, 873, 874, 876, 877
PIC16F873A, 874A, 876A, 877A
PIC16F882, 883, 884, 886, 887
PIC16F913, 914, 916, 917
PIC16F946

PIC18 Devices

‘LF’ versions of all devices are also supported

PIC18F242, 252, 442, 452
PIC18F248, 258, 448, 458
PIC18F1220, 1320, 2220, 2320
PIC18F1230, 1330
PIC18F2221, 2321
PIC18F2331, 2410, 2420, 2431
PIC18F2423
PIC18F2450, 2455, 2458, 2480
PIC18F2510, 2515, 2520, 2523
PIC18F2525
PIC18F2550, 2553, 2580, 2585
PIC18F2610, 2620, 2680
PIC18F2682, 2685
PIC18F4220, 4221
PIC18F4320, 4321, 4331
PIC18F4410, 4420, 4423
PIC18F4431, 4450, 4455
PIC18F4458, 4480
PIC18F4510, 4515, 4520, 4523
PIC18F4525, 4550, 4553, 4580
PIC18F4585
PIC18F4610, 4620, 4680
PIC18F4682, 4685
PIC18F6310, 6390, 6393
PIC18F6410, 6490, 6493
PIC18F6520, 6525, 6527, 6585
PIC18F6620, 6621, 6622, 6627
PIC18F6628, 6680
PIC18F6720, 6722, 6723
PIC18F8310, 8390, 8393
PIC18F8410, 8490, 8493
PIC18F8520, 8525, 8527, 8585
PIC18F8621, 8620, 8622, 8627
PIC18F8628, 8680
PIC18F8720, 8722, 8723
PIC18F24J10, 25J10, 44J10, 45J10
PIC18F24J11, 25J11, 26J11, 44J11, 45J11, 46J11
PIC18F24J50, 25J50, 26J50, 44J50, 45J50, 46J50
PIC18F63J11, 63J90, 64J11, 64J90
PIC18F65J10, 65J11, 65J15
PIC18F65J50, 65J90
PIC18F66J10, 66J11, 66J15, 66J16
PIC18F66J50, 66J55, 66J60, 66J65
PIC18F66J90
PIC18F67J10, 67J11, 67J50, 67J60
PIC18F67J90
PIC18F83J11, 83J90, 84J11, 84J90
PIC18F85J10, 85J11, 85J15, 85J50
PIC18F85J90
PIC18F86J10, 86J11, 86J15, 86J16
PIC18F86J50, 86J55, 86J60, 86J65
PIC18F86J90
PIC18F87J10, 87J11, 87J50, 87J60
PIC18F87J90
PIC18F96J60, 96J65
PIC18F97J60
PIC18F13K50*, 14K50*

- Use AC244023 ICD header.

PIC18F24K20, 25K20, 26K20
PIC18F44K20, 45K20, 46K20
PIC18F14K22

PIC24 Devices

PIC24F08KA101, 08KA102
PIC24F16KA101, 16KA102
PIC24FJ16GA002, 16GA004
PIC24FJ32GA002, 32GA004
PIC24FJ48GA002, 48GA004
PIC24FJ64GA002, 64GA004
PIC24FJ64GA006, 64GA008, 64GA010
PIC24FJ64GB106, 64GB108, 64GB110
PIC24FJ96GA006, 96GA008, 96GA010
PIC24FJ128GA006, 128GA008, 128GA010
PIC24FJ128GA106, 128GA108, 128GA110
PIC24FJ128GB106, 128GB108, 128GB110
PIC24FJ192GA106, 192GA108, 192GA110
PIC24FJ192GB106, 192GB108, 192GB110
PIC24FJ256GA106, 256GA108, 256GA110
PIC24FJ256GB106, 256GB108, 256GB110
PIC24HJ12GP201, 12GP202
PIC24HJ16GP304
PIC24HJ32GP202, 32GP204
PIC24HJ32GP302, 32GP304
PIC24HJ64GP202, 64GP204
PIC24HJ64GP206, 64GP210, 64GP506
PIC24HJ64GP502, 64GP504, 64GP510
PIC24HJ128GP202, 128GP204
PIC24HJ128GP206, 128GP210, 128GP306
PIC24HJ128GP310
PIC24HJ128GP502, 128GP504
PIC24HJ128GP506, 128GP510
PIC24HJ256GP206, 256GP210, 256GP610

dsPIC30 Devices

dsPIC30F1010
dsPIC30F2010, 2011, 2012
dsPIC30F2020, 2023
dsPIC30F 3010, 3011, 3012
dsPIC30F3013, 3014
dsPIC30F4011, 4012, 4013
dsPIC30F5011, 5013, 5015, 5016
dsPIC30F6010A, 6011A, 6012A
dsPIC39F6013A, 6014A, 6015

dsPIC33 Devices

dsPIC33FJ12GP201, 12GP202
dsPIC33FJ16GP304
dsPIC33FJ32GP202, 32GP204
dsPIC33FJ32GP302, 32GP304
dsPIC33FJ64GP202, 64GP204
dsPIC33FJ64GP206, 64GP306, 64GP310
dsPIC33FJ64GP706, 64GP708, 64GP710
dsPIC33FJ64GP802, 64GP804
dsPIC33FJ128GP202, 128GP204
dsPIC33FJ128GP206, 128GP306, 128GP310
dsPIC33FJ128GP706, 128GP708, 128GP710
dsPIC33FJ128GP802, 128GP804
dsPIC33FJ256GP506, 256GP510, 256GP710
dsPIC33FJ06GS101, 06GS102, 06GS202
dsPIC33FJ16GS402, 16GS404
dsPIC33FJ16GS502, 16GS504
dsPIC33FJ12MC201, 12MC202
dsPIC33FJ16MC304
dsPIC33FJ32MC202, 32MC204
dsPIC33FJ32MC302, 32MC304
dsPIC33FJ64MC202, 64MC204
dsPIC33FJ64MC506, 64MC508, 64MC510
dsPIC33FJ64MC706, 64MC710
dsPIC33FJ64MC802, 64MC804
dsPIC33FJ128MC202, 128MC204
dsPIC33FJ128MC506, 128MC510
dsPIC33FJ128MC706, 128MC708, 128MC710
dsPIC33FJ128MC802, 128MC804
dsPIC33FJ256MC510, 256MC710
User avatar
nwclasantha
Posts: 75
Joined: Wed Apr 24, 2013 12:57 am
Location: Malabe

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by nwclasantha » Sun May 05, 2013 5:21 pm

MikroC PIC Pro Manual
MikroC-PIC-Pro-Manual.rar
??? ????? ???????? ???? ?????? ??????? ????? ?????? ?????? ???? ??????? ????????? ??? ???????? .


?? ???? ?????? ?????? ????????? ??? ??????? ??????? Proteus ????? "IDE + Simulator + Emulator + PCB + 3D" ??????? ?????? ???????????? ?? ?????? ?? ?? ?????? ?? ?????? ????? ?????? ????? ????????? ???? ????????? ????? ????? . ?????? ????? ???????? ???? ?????? ??????? ???? ??? ??????? ?? ..!

1. ??? ???? ?? ???????? Proteus Simulator ? ?? (MikroC PIC Pro ???? ?? ?????? ?? ???? ?????? ?????)
1.jpg
2. Proteus Simulator ? ?? ??? ????? PIC MCU ?? ?? ??????? ?????? ?? ??? ??? ??? ???? ?????? ?? ??????? ???? ?????????? .. ?? ????? ?? ????? Compiled ?? MikroC PIC Pro ????? ???? C Source File ????? Path ?? ????????.
???? Proteus Simulator ? ??? ?? ??? ???? ?? ?????? ??? ????? ?? ????? ?? . ?????? Proteus Simulator ? ?? ???????? ? ?????? ????? ??????? ???? ????? (Simulate) ?????..!
2.jpg
3. ??? ?????? ????? Proteus Simulator ? ?? ?????? ??? ????????? / ??? ?? ?????? Proteus PCB ???? ?? ????? ???????? ?????
???????? ??? ???? ??? ??? ????/ ??????? ???? ?? / ??? ???? ??? ???? ???? ..! ????? ???? ??????? ????? ???? ???? ??? ???? ??? ????? ?? ????? ..! ????? ??? Auto Routing ????? ????????????? ????? ..

??? ????? ??? ???? ?? PCB ?????? 3D ????? ?? .. ?? ??? ?????? ??? ??????? ????? ????? .
3.jpg
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by Rksk » Sun May 05, 2013 6:50 pm

nwclasantha, ?????????? ????? ?????. :biggrin:


?? ???? ??? MikroC project settings ??? ?????, ????? ?? ?????? ? ??? ??????? ??.
setup.JPG
setup.JPG (59.68 KiB) Viewed 10562 times

????? ?? ?????? ?????? ??? ???? ??? ????, ??? ??? ??????????? ??? ?????? ,??????.
[media]http://www.youtube.com/watch?v=hpFEQ0kC-6s[/media]
User avatar
nwclasantha
Posts: 75
Joined: Wed Apr 24, 2013 12:57 am
Location: Malabe

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by nwclasantha » Sun May 05, 2013 6:55 pm

It is possible to debug and analyze your code through a software or hardware simulator. Debugging Your Code

If your program has been built correctly, the compiler should generate a .hex file and a .cof file. The cof file contains all the information necessary for high-level debugging in MPLAB , and it should be loaded by selecting the File › Import... menu in the MPLAB .Once you have done this, you have two choices: either to use MPLAB ICD 2 Debugger, if you have the appropriate hardware, or MPLAB® Simulator.
User avatar
aruna1984c
Posts: 1
Joined: Tue Feb 05, 2013 12:17 am

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by aruna1984c » Sun May 05, 2013 9:31 pm

????? ???????? Rksk ?? Programming ??? ???? ????? ????? ??. ????? ?????? ?????? ??????? ??? ?????. ?????? ????? ?????? ???????.
???? ??? ??????? ????????? ??????? ????. ???? ????? ????? ??????? ????? ???????.
Thanks again....
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by Rksk » Sun May 05, 2013 10:21 pm

aruna1984c wrote:????? ???????? Rksk ?? Programming ??? ???? ????? ????? ??. ????? ?????? ?????? ??????? ??? ?????. ?????? ????? ?????? ???????.
???? ??? ??????? ????????? ??????? ????. ???? ????? ????? ??????? ????? ???????.
Thanks again....
??? ???? ???? ????? ??? ????? ??????? ??? ????. ?? ????? ?????? ??? ??? ????? youtube video list ?? ?????. ????? ?????? ????.
??. :biggrin:
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: ????? ??? ??????? ????? LED ??? ???????? ????

Post by Rksk » Wed May 08, 2013 3:10 pm

PWM lines ???????? ???? ?? ?????? ???? ???? ??.
?? ??? ?????? ???, ????? ???? ????????. :yahoo:

Code: Select all

char chaser[] = {0, 1, 5, 10, 20, 30, 50, 100};
char i;

void main() {
  PORTA = 255;
  TRISA = 255;
  PORTB = 0; 
  TRISB = 0; 


while(1){

   for ( i = 0; i < 100; i++ )
   {
      if (chaser[0]-i>0) PORTB.B0=1;
      else PORTB.B0=0;
      if (chaser[1]-i>0) PORTB.B1=1;
      else PORTB.B1=0;
      if (chaser[2]-i>0) PORTB.B2=1;
      else PORTB.B2=0;
      if (chaser[3]-i>0) PORTB.B3=1;
      else PORTB.B3=0;
      if (chaser[4]-i>0) PORTB.B4=1;
      else PORTB.B4=0;
      if (chaser[5]-i>0) PORTB.B5=1;
      else PORTB.B5=0;
      if (chaser[6]-i>0) PORTB.B6=1;
      else PORTB.B6=0;
      if (chaser[7]-i>0) PORTB.B7=1;
      else PORTB.B7=0;
      delay_us(20);
   }
}


}
Post Reply

Return to “Microcontrollers”