Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - tatree_b

#1
     ผมใช้ 12F1572 ทดลองฟังค์ชั้นต่างๆ ผมสามารถเขียนคำสั่ง  LATAx  INT  IOCAPx   Timer2 ได้ปกติ แต่ติดปัญหาคือเหมือนมันจะทำงานเฉพาะที่ความถี่ default 500kHz ตามดาต้าชีทเท่านั้น ผมไม่สามารถเปลี่ยนสัญญาณนาฬิกาเป็น 4MHz ได้ พอเปลี่ยนคำสั่งจาก
#define _XTAL_FREQ 500000   เป็น #define _XTAL_FREQ 4000000   ค่าดีเลย์ในโปรแกรมมันจะออกมาไม่ตรงความจริงเลย (ใช้มิเตอร์วัดความถั้จับดู)็

ผมลองใช้คำสั่ง OSCCON ก็คอมไพล์ไม่ผ่าน เนื่องจากมันไม่เข้าใจการเซท OSCCON (ผมใช้วิธัทั้งเขียนเอง ลอกเขาจากเน็ต ทุกวิธีมันก็ทำอะไรไม่ได้ เหมือนมันจะมองเป็นตัวแปรที่ไม่ได้ type ไว้) คำสั่งที่แนบผมก็แค่ใช้ทำไฟกระพริบ  รบกวนช่วยดูหรือขอคำสั่ง XC8 เพื่อสั่งทำงานที่ 4MHz หน่อยครับ


#include <xc.h>
#define _XTAL_FREQ 500000   

// CONFIG1
#pragma config FOSC     = INTOSC    //  (INTOSC oscillator; I/O function on CLKIN pin)
#pragma config WDTE     = OFF       // Watchdog Timer Enable (WDT disabled)
#pragma config PWRTE    = ON       // Power-up Timer Enable (PWRT disabled)
#pragma config MCLRE    = ON        // MCLR Pin Function Select (MCLR/VPP pin function is MCLR)
#pragma config CP       = OFF       // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config BOREN    = OFF       // Brown-out Reset Enable (Brown-out Reset disabled)
#pragma config CLKOUTEN = OFF       // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)

// CONFIG2
#pragma config WRT      = OFF       // Flash Memory Self-Write Protection (Write protection off)
#pragma config PLLEN    = OFF       // PLL Enable (4x PLL disabled)
#pragma config STVREN   = ON        // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV     = LO        // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
#pragma config LPBOREN  = OFF       // Low Power Brown-out Reset enable bit (LPBOR is disabled)
#pragma config LVP      = OFF       // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming)

    // ==================     // Configure I/O pins     // ==================
OSCCON  = 0b01101000;

int main(void){
CM1CON1 = 0x07;
ANSELA = 0b00000000; // all pins to digital
LATA = 0b00001110; // all port bits off
TRISA = 0b00001110; // all pins to outputs except RA0,RA3 (MCLR)
// LATA5 = 0;

while(1){

   LATA5 = 1;
   __delay_us(2500);

   LATA5 = 0;
   __delay_us(2500);   

     }
#2
Microchip PIC / บั้กของ xc8 ?
August 28, 2018, 10:02:25 AM
ผมเขียนโค้ดของ 12F683  ซึ่งปกติใช้ใน XC8 เวอร์ชั่น 1.45 ก็ใช้งานได้ดี แต่พอเพิ่งเปลี่ยนเป็น เวอร์ชั่น 2.00 ปรากฎว่ามันไม่รู้จักตัวแปรแบบบิทซะงั้น






ผมลองเปลี่ยนตัวแปนแบบบิทเป็นอินทีเจอร์มันก็ผ่าน มาติดตราง void หน้าคำสั่ง interrupt อีก ตอนนี้เลยไม่กล้าใช้ 2.00 

ไม่ทราบมีใตรเจอปัญหาอะไรอีกบ้างไหมครับ ?

ที่ผมเคยเจอ
- 12F509 เซทขา 5 เป็นเอ้าพุทไม่ได้ แต่แอสแซมบลี้ไม่มีปัญหา (เจอตั้งแต่ 1.33 ก่อนหน้านั้นไม่ได้ลอง)
- 12F1840 มันรันแต่ใน interrupt routine แต่คำสั่งใน main loop มันข้ามเฉยเลย ถ้าตัดส่วนอินเตอร์รัพท์ออก โปรแกรมในเมนถึงจะทำงาน (เป็นกับชิพเบอร์นี้ ยังงงอยู่)
#3
เรียบร้อยแล้ว   ขอขอบคุณบอร์ดนี้ครับ   ;D

ขายกล้องส่องภาพความร้อน FLUKE VT02 สภาพเยี่ยม

ของจากตัวแทนเมเชอร์โทรนิกส์แท้ (ซื้อจากอิเล็คฯ ซอร์ส) ถ่าน2เอ 4 ก้อนในรูป ไม่มีนะครับเพราะอยู่ในกล้องแล้ว
เมโมรี่ที่ให้มามีขนาด 1 GB แต่เหลือๆ เพราะแต่ละรูปใช้แค่ 45 kB

ใช้งานได้สมบูรณ์แบบเพราะไม่ค่อยได้ใช้
ขอขายราคา 15000 บาทรวมส่ง EMS ครับ 
ติดต่อ tatree_b@yahoo.com  โทร. 061-3542939  ผมไม่มีไลน์ครับ แต่ติดต่อทางอีเมล์จะสะดวกที่สุด

BtbItN.jpg" border="0

BtbMlV.jpg" border="0

Btlixg.jpg" border="0

BtjNC1.jpg" border="0

Btj4g2.jpg" border="0

BtjzSW.jpg" border="0

BtjSHg.jpg" border="0

Btj7qn.jpg" border="0

Btj0fS.jpg" border="0

BtjWGQ.jpg" border="0


ภาพตัวอย่างที่เคยถ่ายครับ

BtP57f.jpg" border="0

BtPEca.jpg" border="0

BtPO2q.jpg" border="0


#4
Signal Analysis - Time, Frequency, Scale and Structure  2004   Wiley   3.6MB

Ronald L. Allen
Duncan W. Mills


http://dsp-book.narod.ru/SATFSS1.pdf
#5
ขาย Industrial Digital Multimeter FLUKE 233 ซึ่งถอดหัวมาอ่านได้ในระยะ 10 เมตรจากตัวเครื่อง สำหรับวัดในสถานที่อันตราย หรือ ต้องการจะมอนิเตอร์ตลอดเวลาขณะทำกิจกรรมอื่น

สภาพเครื่องใหม่มาก ปุ่มสวิทช์แน่นหนา เพราะ ใช้สลับกับตัวอื่น ไม่เคยแกะใดๆ สติ้กเกอร์ไม่ขาด อุปกรณ์ครบสายวัด หัวคีบ หัววัดอุณหภูมิ  รวมทั้งใบรับประกันจากเมเซอร์ทรอนิคส์


ขายราคา 7,500 บาทรวมส่งลงทะเบียนครับ ติดต่อ 0816392035 คุณธาตรี    e-mail :   tatree_b@yahoo.com






ทดสอบอุณหภูมิ




ทดสอบกับแบตโทรศัพท์ 2.4 โวลต์




ทดสอบการวัดกระแส






#7


เป็นกล้อง HD ที่ติด ARM controller เข้าไป สร้างเป็นระบบโอเพ่นซอร์สโดยมหาลัยคาเนกี้ เมลอน ราคาไม่แพงมากประมาณ 2500 แถมเมืองไทยกำลังจะมีขายแว้ว



กะว่าเอามาทำระบบกันขโมยที่แทรคกิ้งตามวัตถุได้ หรือไม่ก็ทำระบบนำวิถีแม่มซะเลย อิอิ
https://www.youtube.com/watch?v=J8sl3nMlYxM


สนใจดูได้ที่นี่ครับ http://www.cmucam.org/projects/cmucam5
#8

          The foundations of this book lie in the highly successful text Principles of Measurement
and Instrumentation by the same author. The first edition of this was published in 1988,
and a second, revised and extended edition appeared in 1993. Since that time, a number
of new developments have occurred in the field of measurement. In particular, there
have been significant advances in smart sensors, intelligent instruments, microsensors,
digital signal processing, digital recorders, digital fieldbuses and new methods of signal
transmission. The rapid growth of digital components within measurement systems has
also created a need to establish procedures for measuring and improving the reliability
of the software that is used within such components. Formal standards governing instrument
calibration procedures and measurement system performance have also extended
beyond the traditional area of quality assurance systems (BS 5781, BS 5750 and more
recently ISO 9000) into new areas such as environmental protection systems (BS 7750
and ISO 14000). Thus, an up-to-date book incorporating all of the latest developments
in measurement is strongly needed. With so much new material to include, the opportunity
has been taken to substantially revise the order and content of material presented
previously in Principles of Measurement and Instrumentation, and several new chapters
have been written to cover the many new developments in measurement and instrumentation
that have occurred over the past few years. To emphasize the substantial
revision that has taken place, a decision has been made to publish the book under a
new title rather than as a third edition of the previous book. Hence, Measurement and
Instrumentation Principles has been born.

https://people.ifm.liu.se/danfi/TFMT14/Site/TFMT14_files/Measurement%20%26%20Instrumentation%20Principles,3rd%20Edition_Morris.pdf
#11
เบอร์ Si501 ของ Silicon Labs  ดูจากดาต้าชีทเหมือนว่าจะเปลี่ยนความถึ่ด้วยการปรับค่า Rup หรือเปล่าครับ





http://www.farnell.com/datasheets/1792138.pdf



#12
ตัวเล็กขนาด 20 มิลิแอมป์ธรรมดาเลย ราคาแถวๆ พันบาท เช็คอย่างละเอียดแล้วก็ค่อนข้างแน่ใจว่าราคาต่อตัวจริงๆ ไม่ทราบว่าเมืองไทยมีขายแถวไหนที่เป็นออนไลน์ไหมครับ




#13
ในรายการสินค้าแสดงความสว่างที่ 7000 mcd แต่ความจริงในสเปคมันแค่ 2พันกว่าเท่านั้น 7000 มันมีหน่วยเป็นมิลลิลูเมนส์นะครับ ยังไงก็ดูดาต้าชีทให้ดีก่อน







ข้อมูลจากดาต้าชีท

#14
ขายที่อีซอร์สของ GW Instek ราคานี้ถูกกว่า Function Gen ธรรมดาหลายรุ่นอีก เสียดายเพิ่งซื้อไปก่อน 2 ตัว



http://www.es.co.th/detail.asp?Prod=38201253

http://www.es.co.th/Schemetic/PDF/AFG2000-AFG2001.PDF