• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::

論壇索引


Board index » All Posts (billleu)




Re: Anyone use Graphics PICtail Plus Board?
#1
新會員
新會員


i am not use the hex file by microchip. i have use c30 to compiler the source and download the the chip

發表於: 2008/1/23 14:36
頂部


Re: Anyone use Graphics PICtail Plus Board?
#2
新會員
新會員


yes.i use the stack is microchip library.That's ok

http://www.microchip.com/graphics

發表於: 2008/1/23 14:33
頂部


Re: Anyone use Graphics PICtail Plus Board?
#3
新會員
新會員


just plug the card from the edge connector.
and download the library from microchip. compiler and down load. that ok. i had tested.
now i create the bitmap from my tools.

發表於: 2008/1/22 19:10
頂部


Re: 2007最後一個問題?
#4
新會員
新會員


首先你需對audio取樣,再利用FFT轉換,接著對triac做相位控制即可.

發表於: 2007/12/28 13:23
頂部


Re: CC2500
#5
新會員
新會員


可以連絡合申堂應可要到.

發表於: 2007/12/11 22:23
頂部


Re: pic24f uart傳輸疑問
#6
新會員
新會員


我也有一樣問題!!
我覺的問題在
while(!U1STAbits.TRMT); <--------
U1TXREG = 'C';
同樣程式在24fj128ga010就沒問題.

以下是我的程式
#define byte unsigned char
#define word unsigned int
#include "p24fj64ga002.h"

_CONFIG1JTAGEN_OFF GCP_OFF GWRP_OFF BKBUG_OFF COE_OFF ICS_PGx1 FWDTEN_OFF WINDIS_OFF FWPSA_PR128 WDTPS_PS32768 )
_CONFIG2IESO_OFF FNOSC_PRIPLL FCKSM_CSDCMD OSCIOFNC_OFF IOL1WAY_OFF I2C1SEL_PRI POSCMOD_XT )

// the above include path may be different for each user.  If a compile
// time error appears then check the path for the file above & edit
// the include statement above.

#define XTFREQ          7372800                 //On-board Crystal frequency
#define PLLMODE         2                       //On-chip PLL setting
#define FCY             XTFREQ*PLLMODE        //Instruction Cycle Frequency

#define BAUDRATE         9600       
#define BRGVAL          ((FCY/BAUDRATE)/16)-1 


byte G_rx[255] ;
byte G_rx_index;
byte G_rx_now  ;
byte G_rx_mod  ;
byte G_rx_tmp  ;
byte G_rx_byte ;

byte G_tx[256] ;
byte G_tx_index;
byte G_tx_now  ;
byte G_tx_mod  ;
byte G_tx_tmp  ;
byte G_tx_byte ;

word G_word    ;
word G_word_tmp;
word G_tx_check;

int main(void)
{
 
CLKDIVbits.RCDIV 0;
 
RPINR18bits.U1RXR 9;     // Make Pin RP9 U1RX
 
RPOR4bits.RP8R 3;     // Make Pin RP8 U1TX
 
PADCFG1 0xFF;         // Make analog pins digital 
 
LATB 0x0;
 
TRISB 0x0FFF;        // Configure LED pins as output
 
TMR1 0;                // Clear timer 1
 
PR1 0x3D09;            // Interrupt every 250ms
 
IFS0bits.T1IF 0;        // Clear interrupt flag
 
IEC0bits.T1IE 1;        // Set interrupt enable bit
 
T1CON 0x8030;        // Fosc/4, 1:256 prescale, start TMR1
 
TRISB 0x0300;
 
U1BRG  BRGVAL;
 
U1MODE 0x8000;         // Reset UART to 8-n-1, alt pins, & enable 
 //U1STA  = 0x0440;         // Reset status register & enable TX & RX
 
U1STA  0x0400;         // Reset status register & enable TX & RX for one char interrupt
 
_U1RXIF=0;                // Clear UART RX Interrupt Flag
 
_U1RXIE 1;           // Interruption active pour la reception 
 
 
 
G_rx_index=0;
 
G_rx_now  =0;
 
G_rx_mod  =127;
 
G_word=35;
 while(
1)
 {
  
//while (_U1RXIF==0);            // Wait & Receive One Character
  //while(!U1STAbits.TRMT);
  //U1TXREG = '"';
  //while(!U1STAbits.TRMT);        // Echo Back Received Character with quotes
  //U1TXREG = a;
  //while(!U1STAbits.TRMT);
  //U1TXREG = '"';
  //while(!U1STAbits.TRMT);
  //U1TXREG = ' ';     
  //_U1RXIF=0;                    // Clear UART RX Interrupt Flag
  //G_word=G_word & 0x0fff;
  //if (G_rx_now==G_rx_index)
  //{
  //}
  //while(!U1STAbits.UTXBF); /* wait if the buffer is full */
  //U1TXREG = 0x0030;
  
while(!U1STAbits.TRMT);
  
U1TXREG 'C';
  
//for(G_tx_check=0;G_tx_check<65535;G_tx_check++)G_word++; 

  //if (G_tx_check==0){U1TXREG = 'B';G_tx_check=1;}else{
  //LATB ^= 0x4000;            //Toggle LED's

  //while(!U1STAbits.UTXBF);
  //{
  // U1TXREG = 'a';
  // LATB ^= 0xF000;            //Toggle LED's

   //if (U1STAbits.UTXBF)
   //{
   // if(G_rx_now != G_rx_index)
   // {
   //  G_rx_now=((G_rx_now+1) & G_rx_mod);
   //  U1TXREG = G_rx[G_rx_now];
   // }
   //}
  //}

  //if (U1STAbits.TRMT){G_rx_now=(G_rx_now+1) % G_rx_mod;U1TXREG = G_rx[G_rx_now];}

 
}
 return 
0;
}

void __attribute__((interruptno_auto_psv)) _T1Interrupt(void)
{
 
IFS0bits.T1IF 0;        // clear interrupt flag
 
G_word_tmp=G_word;
 
G_rx_tmp=((G_rx_index+1) & G_rx_mod);
 if (
G_rx_tmp == G_rx_now){ G_rx_tmp=((G_rx_tmp+1) &  G_rx_mod);}
 
G_word_tmp=(G_word 0x000f);
 
//G_word_tmp=(G_word_tmp >> 4);
 
G_rx[G_rx_tmp]=(byte)(G_word_tmp);
 
G_rx_index=G_rx_tmp;
 
LATB ^= 0x8000;            //Toggle LED's
}

void __attribute__ ((__interrupt__,no_auto_psv)) _U1RXInterrupt(void

  
_U1RXIF 0
  
G_rx_tmp=(G_rx_index+1) & G_rx_mod;
  if (
G_rx_tmp==G_rx_now){G_rx_tmp=(G_rx_tmp+1) %  G_rx_mod;}
  
G_rx[G_rx_tmp]=(byte)U1RXREG;
  
G_rx_index=G_rx_tmp;
  
LATB ^= 0x4000;            //Toggle LED's
}


發表於: 2007/8/31 11:42
頂部






:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------