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

論壇索引


Board index » All Posts




Re: ICD 2 用的 6 pin Connector
初級會員
初級會員


一般電子材料行
找6 Pin 的 Phone Jet

應該蠻好找的

發表於: 2005/3/30 11:51
頂部


Re: Target not in debug mode 的問題
初級會員
初級會員


根據Error Message看來

1.使用ICD2模擬,請把低電壓燒錄關掉
2.使用ICD2模擬,請把WDT關掉
3.請注意你板子上的震盪頻率,並選擇正確的震盪頻率選項

應該這樣 就可以了

發表於: 2005/3/30 11:49
頂部


ICD 2 用的 6 pin Connector
新會員
新會員


想在自己做的 PCB 加上連接 ICD 2用的6腳插座, 這種插座可在那裡找到? 謝謝!

發表於: 2005/3/30 11:45
頂部


Re: 主程式與指令程式的問題
初級會員
初級會員


從Error Mssage中看來
是'F_Delay'重複定義

你查一下 F_Delay 是否重複定義

發表於: 2005/3/30 11:42
頂部


主程式與指令程式的問題
新會員
新會員


大家好,我是使用C18來進行Build All,在source files加入主程式與指令程式,但卻顯示:

Error - symbol 'F_Delay' has multiple definitions.

請各位前輩,告訴我,是哪裡出錯阿! 謝謝~~~

主程式:
#include <p18cxxx.h>
#include "delay.c"
#define LEFT 0
#define RIGHT 1
void F_Initial ( void );
void main (void)
{
int I_Direction=LEFT;
F_Initial();
while ( 1 )
{
F_Delay ( 5000 );
switch ( I_Direction )
{
case LEFT:
PORTD <<= 1;
if ( PORTD == 128 )
I_Direction = RIGHT;
break;
case RIGHT:
PORTD >>= 1;
if ( PORTD == 1 )
I_Direction = LEFT;
break;
default:
break;
}
}
}

void F_Initial ()
{
TRISD = 0;
PORTD = 1;
}

指令程式:
#include <p18cxxx.h>
#include <delays.h>
#define LCD_CMD PORTE
#define LCD_DATA PORTB
void F_LCD_Clear(void);
void F_LCD_Home(void);
void F_LCD_Entry(unsigned char);
void F_LCD_Display(unsigned char);
void F_LCD_Cursor(unsigned char);
void F_LCD_Function(unsigned char);
void F_LCD_Set_CGA(unsigned char);
void F_LCD_Set_DDA(unsigned char);
unsigned char F_Check_LCD_Busy(void);
void F_LCD_Put_Cmd(unsigned char);
void F_LCD_Put_Data(unsigned char);
void F_LCD_Initial(void);
void F_LCD_Clear(void)
{
F_LCD_Put_Cmd(0x01);
Delay10TCYx(200);
}

void F_LCD_Home(void)
{
F_LCD_Put_Cmd(0x02);
}

void F_LCD_Entry(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x04 | (0x03 & UC_LCD_CMD));
}

void F_LCD_Display(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x08 | (0x07 & UC_LCD_CMD));
}

void F_LCD_Cursor(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x10 | (0x0c & UC_LCD_CMD));
}

void F_LCD_Function(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x20 | (0x1c & UC_LCD_CMD));
}

void F_LCD_Set_CGA(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x40 | (0x3F & UC_LCD_CMD));
}

void F_LCD_Set_DDA(unsigned char UC_LCD_CMD)
{
F_LCD_Put_Cmd(0x80 | (0x7F & UC_LCD_CMD));
}

unsigned char F_Check_LCD_Busy(void)
{
unsigned char UC_LCD_Temp;
TRISB = 0xFF;
LCD_CMD = 0x06;
UC_LCD_Temp = (0x80 & LCD_DATA);
TRISB = 0;
if ( UC_LCD_Temp == 1 )
return (1);
else
return (0);
}

void F_LCD_Put_Cmd(unsigned char UC_LCD_CMD)
{
while ( F_Check_LCD_Busy() );
LCD_CMD = 0x04;
LCD_DATA = UC_LCD_CMD;
LCD_CMD = 0x00;
Delay10TCYx(50);
}

void F_LCD_Put_Data(unsigned char UC_LCD_Data)
{
while ( F_Check_LCD_Busy() );
LCD_CMD = 0x05;
LCD_DATA = UC_LCD_Data;
LCD_CMD = 0x01;
Delay10TCYx(50);
}

void F_LCD_Initial(void)
{
F_LCD_Put_Cmd(0x30);
F_LCD_Put_Cmd(0x30);
F_LCD_Put_Cmd(0x30);
F_LCD_Function(0x38);
F_LCD_Display(0x0e);
F_LCD_Clear();
F_LCD_Entry(0x06);
}

發表於: 2005/3/30 10:01
頂部


如何自己設計toolbox??
新會員
新會員


如題
我希望利用MPLAB來complier我的程式
而我希望將程式像MATLAB一樣
放在MPLAB的目錄下
就像是放在自己所設的toolbox中
不知道可不可行
不知道該從何下手 去了解設計步驟及方法
*我現在使用的單晶片為16F877

===麻煩各位大大===

發表於: 2005/3/30 9:22
頂部


Re: PIC12F675燒錄問題
資深會員
資深會員


只有燒壞或燒錯,不會燒不進去。

如果你第一次使用 12f6xx,那這顆被你玩掛的機會很大

燒錄順序 read ->import ->program

順序錯了,ic就廢了,校正值會 lose

發表於: 2005/3/30 8:07
頂部


為何APP0001板之RS-232收不到資料?
初級會員
初級會員


以下是用rs-232接收來自終端機字元,
然後顯示在LCD之程式,且輸出到port D
為何都收不到,那裡出錯?
謝謝

#include "main.h"

#pragma idata access My_RAM_2

near unsigned char Rec_Data=0;

#pragma idata

void main(void)
{
char Title[16]="The DATA System"+0x00;
char p;

// Initial portD
TRISD=0x00;
PORTD=0x00;
OpenLCD();
InitializeUSART();
LCD_Set_Cursor(0,0);
putsLCD(Title);

LCD_Set_Cursor(1,0);
putcLCD('R');
LCD_Set_Cursor(1,1);
putcLCD(':');


while (1)
{
p=Rec_Data;
LCD_Set_Cursor(1,3);
putcLCD(p);
PORTD=P;
Delay10KTCYx(500);

}
}

//************************************************
//* Function: isr_high_direct *
//* - Direct execution to the actual *
//* Hi-priority interrupt code. *
//************************************************
#pragma code isrhighcode = 0x0008

void isr_high_direct(void)
{
_asm //begin in-line assembly
goto isr_high //go to isr_high function
_endasm //end in-line assembly
}
#pragma code

//************************************************
//* Function: isr_high(void) *
//* High priority interrupt: *
//* - Received a serial data from RS-232 *
//* Save the received data to buffer Rec_Data*
//************************************************
#pragma interrupt isr_high

void isr_high(void)
{
if (DataRdyUSART())
{
Rec_Data=ReadUSART(); // Get RS-232 data
}

}
#pragma code

發表於: 2005/3/30 7:39
頂部


18F452 的 FSR怎么用?
新會員
新會員


在用18F 的 FSR 时有两个存储单元 FSR0L/FSR0H,当FSR0L increase 到 OXFF 的时候,FSR0H还是0X00。 有什么办法可以让FSR0H在FSR0L到0XFF的时候自动 increase 吗?谢谢!!

發表於: 2005/3/30 5:55
頂部


Re: 請教
新會員
新會員


我用的也是18F452, 我注意到了FSR0L/FSR0H,但是当FSR0L increase 到 OXFF 的时候,FSR0H还是0X00。 有什么办法可以让FSR0H在FSR0L到0XFF的时候自动 increase 吗?

發表於: 2005/3/30 5:47
頂部



« 1 ... 7166 7167 7168 (7169) 7170 7171 7172 ... 7522 »



:::

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... ]

教育訓練中心

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