PIC Vietnam

Go Back   PIC Vietnam > Microchip PIC > Cơ bản về vi điều khiển và PIC > Những câu hỏi thường gặp

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Tìm Kiếm Bài Trong Ngày Ðánh Dấu Ðã Ðọc Vi điều khiển

Những câu hỏi thường gặp Những lỗi cơ bản thường gặp khi làm việc với PIC hoặc những vấn đề cơ bản nhất thường được hỏi trong những năm qua

Trả lời
 
Ðiều Chỉnh Xếp Bài
Old 25-05-2012, 11:42 AM   #1
ntd_17689
Nhập môn đệ tử
 
Tham gia ngày: Sep 2010
Bài gửi: 2
:
Unhappy Không reset được cho PIC6F1947 cả mức thấp lẫn mức cao

Hiện tại em đang làm việc với PIC6f1947
Không biết vì sao mà ko thể reset được cho chip
Em nghĩ là do phần Config trong code
Rất mong các bác chỉ giúp
Cảm ơn các bác nhiều
Đây là phần config của em
__CONFIG (CONFIG1 // Address 8007
//**************************//
// Oscillator Selection //
//**************************//
// & FOSC_ECH // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin
// & FOSC_ECM // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin
// & FOSC_ECL // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin
// & FOSC_INTOSC // INTOSC oscillator: I/O function on CLKIN pin
// & FOSC_EXTRC // EXTRC oscillator: External RC circuit connected to CLKIN pin
&FOSC_HS // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins
// & FOSC_XT // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins
// & FOSC_LP // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins
//**************************//
// Watchdog Timer Enable //
//**************************//
// & WDTE_ON // WDT enabled
// & WDTE_NSLEEP // WDT enabled while running and disabled in Sleep
// & WDTE_SWDTEN // WDT controlled by the SWDTEN bit in the WDTCON register
& WDTE_OFF // WDT disabled
//**************************//
// Power-up Timer Enable //
//**************************//
// & PWRTE_OFF // PWRT disabled
& PWRTE_ON // PWRT enabled
//**************************//
// MCLR Pin Function Select //
//**************************//
& MCLRE_ON // MCLR/VPP pin function is MCLR
// & MCLRE_OFF // MCLR/VPP pin function is digital input
//**************************//
//**************************//
// Flash Program Memory Code Protection
//***************************/
// & CP_OFF // Program memory code protection is disabled
& CP_ON // Program memory code protection is enabled
//***************************/
// Data Memory Code Protection
//***************************/
// & CPD_OFF // Data memory code protection is disabled
& CPD_ON // Data memory code protection is enabled
//***************************/
// Brown-out Reset Enable //
//***************************/
& BOREN_ON // Brown-out Reset enabled
// & BOREN_NSLEEP // Brown-out Reset enabled while running and disabled in Sleep
// & BOREN_SBODEN // Brown-out Reset controlled by the SBOREN bit in the BORCON register
// & BOREN_OFF // Brown-out Reset disabled
//***************************/
// Clock Out Enable //
//***************************/
// & CLKOUTEN_OFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin
& CLKOUTEN_ON // CLKOUT function is enabled on the CLKOUT pin
//***************************/
// Internal/External Switchover
//***************************/
// & IESO_ON // Internal/External Switchover mode is enabled
& IESO_OFF // Internal/External Switchover mode is disabled
//***************************/
// Fail-Safe Clock Monitor Enable
//***************************/
// & FCMEN_ON // Fail-Safe Clock Monitor is enabled
& FCMEN_OFF // Fail-Safe Clock Monitor is disabled
//***************************/
);

__CONFIG (CONFIG2 // Address 8008
//**************************//
// Flash Memory Self-Write Protection
//**************************//
// & WRT_OFF // Write protection off
// & WRT_BOOT // 000h to 1FFh write protected, 200h to 3FFFh may be modified by EECON control
& WRT_HALF // 000h to 1FFFh write protected, 2000h to 3FFFh may be modified by EECON control
// & WRT_ALL // 000h to 3FFFh write protected, no addresses may be modified by EECON control
//**************************//
// Voltage Regulator Capacitor Enable
//**************************//
// & VCAPEN_OFF // VCAP pin functionality is disabled
& VCAPEN_ON // VCAP functionality is enabled on VCAP pin
//**************************//
// PLL Enable //
//**************************//
// & PLLEN_ON // 4x PLL enabled
& PLLEN_OFF // 4x PLL disabled
//**************************//
// Stack Overflow/Underflow Reset Enable
//**************************//
// & STVREN_ON // Stack Overflow or Underflow will cause a Reset
& STVREN_OFF // Stack Overflow or Underflow will not cause a Reset
//**************************//
// Brown-out Reset Voltage Selection
//**************************//
& BORV_19 // Brown-out Reset Voltage (VBOR) set to 1.9 V
// & BORV_25 // Brown-out Reset Voltage (VBOR) set to 2.5 V
//**************************//
// Low-Voltage Programming Enable
//**************************//
// & LVP_ON // Low-voltage programming enabled
& LVP_OFF // High-voltage on MCLR/VPP must be used for programming
//**************************//
);
ntd_17689 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn
Old 13-11-2012, 07:24 PM   #2
cuongadn90
Đệ tử 1 túi
 
Tham gia ngày: Feb 2011
Bài gửi: 16
:
tình hình là mình không thể reset pic 16ff887
mạch reset đâu dùng trở 10k cùng với 1 điện trở thôi , nhưng không thể reset được khi ấn nut, có bác nào có ý kiến j thì cho phản biện nào
__________________
Nguyễn Văn Cương
email :cuongadn90@gmail.com
cuongadn90@yahoo.com.vn
sdt 0973700862
cuongadn90 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn
Trả lời

Ðiều Chỉnh
Xếp Bài

Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt

Chuyển đến


Múi giờ GMT. Hiện tại là 10:55 PM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam