مشاهدة النسخة كاملة : نبدأ على بركة الله دورة picmicro controller
abu hassan 20-09-2004, 03:22 PM اخوانى فى المنتدي يسرنى انا والمهندس ele.eng ان نبدأ دورة picmicro controller وستكون على ان شاء الله مفيدة وشيقة ...
وسوف يتم فتح باب للمناقشة فى تبويب (مناقشات وحوارات فى pic)
وارجوا منكم اخوانى الاعزاء عدم كتابة تعليقاتكم هنا حتى يتسنا لنا عرض الدورة بصورة متسلسلة ومترابطة
وشكرا لكم جميعا اخوانكم : abu hassan
ele.eng
abu hassan 20-09-2004, 04:02 PM Introduction
*We have no idea what we’re talking about, except we’ve used PICs.
*You are here at your own risk.
*We will assimilate you into the Microchip, Inc. PIC family of RISC Microcontrollers. But *there are other good microcontrollers.
*You will enjoy yourselves.
Microcomputer Systems
The term Microcomputer is used to describe a system that includes the minimum of:
Microprocessor
@ Program memory
@ Data memory
@ Input/output (I/O)
http://www.arabkom.com/up/uploading/abu hassan.jpg
Some Microcomputer systems include additional components such as:
@ Timers
@ Counters
@ Analog to Digital Converters (ADC)
Microcontroller Systems
Microcontrollers are general purpose Microprocessors which have additional parts allow them to control external devices.
A Microcontroller executes a user program which is loaded in its program memory.
Under the control of the loaded program, Data is received from external devices (inputs), Manipulated and then sent to external output devices.
Microcontrollers are classified by the number of bits in a data word. 8-bit microcontrollers are the most popular ones and are used in many applications
16- and 32-bit microcontrollers are much more powerful, but usually more expensive and not required in many small to medium general purpose applications
The simplest microcontroller architecture consists of a microprocessor, memory, and I/O.
The Microprocessor consists of a central processing unit(CPU) and a control unit (CU)
Microcontroller Applications
40% 0f microcontroller applications are in office automation
* PCs
* Laser Printers
* Fax machines
1/3 microcontrollers are found in consumer electronic goods
* CD players
* hi-fi equipments
* Video Games
* Washing Macines
* Cookers
Rest of Applications Area
* Communications market
* automotive Market
* Military
Memory is an important part of a microcomputer system; depending upon the application we can classify memories into two groups
@ Program Memory
It stores all the program code and this memory is usually non-volatile, i.e. data is not lost after the removal of power
@ Data memory
Is where the temporary user data is stored during the various arithmetic and logical operations.
ahmedpower 20-09-2004, 05:27 PM شكرا أخي أبو حسان على هذه الفكرة الرائعة وان شاء الله سنبدا جميعا معك
وأي معلومة عندي سوف اساهم بها ان شاء الله
abu hassan 25-09-2004, 12:42 AM There are basically five types of memories as summarized below
@ RAM (Random Access Memory).
@ ROM (Read Only Memory).
@ EPROM (Erasable Programmable Read Only Memory).
@ EEPROM (Electrically Erasable Programmable Read Only Memory).
@ Flash EEPROM
Microcontroller Features
* Supply Voltage
* The Clock
* Timers
* Watchdog
* Reset Input
* Interrupts
* Brown-out Detector
* Analog-to-digital Converter
* Serial Input/Output
* Sleep Mode
* Power-on Reset
* Low Power Operation
* Current Sink/Source Capability
Microcontrollers versus Microprocessors
@ functionality. In order for a microprocessor to be used, other components such as memory, or components for receiving and sending data must be added to it.
@ microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it. Thus, we save the time and space needed to construct devices.
PIC Architecture: Background
@ Microprocessor:
* Requires ‘external’ support hardware
* E.g., External RAM, ROM, Peripherals.
@Microcontroller:
* Very little external support hardware.
* Most RAM, ROM and peripherals on chip.
* “Computer on a chip”, or “System on chip” (SOC)
* E.g., PIC = Peripheral Interface Controller
PIC Architecture: Background
* We’re used to the Von-Neuman Architecture
* Used in: 80X86 (PCs), 8051, 68HC11, etc.)
* Only one bus between CPU and memory
* RAM and program memory share the same bus and the same memory, and so must have the same bit width
* Bottleneck: Getting instructions interferes with accessing RAM
abkaren0 25-09-2004, 10:03 PM مشكور أخي علي هذة المقدمة
jiamola 30-09-2004, 03:05 AM thank you for all
qwasz 07-10-2004, 04:49 PM thxxxxxxxxxxx
abkaren0 09-10-2004, 12:02 AM تمنع الإعلانات لمنتديات أخرى
الرجاء مراسلة المشرف العام مباشرة
شكرا
abu hassan 23-10-2004, 04:01 AM PIC Architecture: Convergence
@ Many Microcontrollers and DSP chips are “converging”
@ Heading towards some mean between RISC and CISC
@ Large CPUs (DSPs) are adding microcontroller like options(the 32bit, 100MHz StrongARM draws only 70mA)
@ Small microcontrollers are getting more powerful, now able to do some DSP
@General trend: Smaller packages, less power consumption, faster
@ Future possibility: “Sea of gates” reconfigurable processor
http://www.arabkom.com/up/uploading/Picture1.png
http://www.arabkom.com/up/uploading/Picture2.png
The PIC Family: Cores
PICs come with 1 of 4 CPU ‘cores’:
@ 12bit cores with 33 instructions: 12C50x, 16C5x
14bit cores with 35 instructions: 12C67x,16Cxxx@
http://www.arabkom.com/up/uploading/Picture3.jpg
@ 16bit cores with 58 instructions: 17C4x,17C7xx
@ ‘Enhanced’ 16bit cores with 77 instructions: 18Cxxx
The PIC Family: Packages
PICs come in a huge variety of packages:
- 8 pin DIPs, SOICs: 12C50x (12bit) and 12C67x (14bit)
- 18pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit)
- 28pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit)
- 40pin DIPs, SOICs: 16Cxxx (14bit), 17C4x (16bit)
- 44 - 68pin PLCCs*: 16Cxxx (14bit), 17C4x / 17Cxxx (16bit)
tarek fawzy 24-10-2004, 12:16 PM مشكور يا أخى
Abu_Saad 30-10-2004, 01:43 AM جزاك الله خير على هذا الشرح والايضاح
ele.eng 30-10-2004, 11:04 PM The PIC Family: Packages
PICs come in a huge variety of packages:
– 8 pin DIPs, SOICs: 12C50x (12bit) and 12C67x (14bit)
– 18pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit)
– 28pin DIPs, SOICs: 16C5X (12bit), 16Cxxx (14bit)
– 40pin DIPs, SOICs: 16Cxxx (14bit), 17C4x (16bit)
– 44 - 68pin PLCCs*: 16Cxxx (14bit), 17C4x / 17Cxxx (16bit)
The PIC Family: Speed
PICs require a clock to work.
Can use crystals, clock oscillators, or even an RC circuit.
Some PICs have a built in 4MHz RC clock
Not very accurate, but requires no external components!
Instruction speed = 1/4 clock speed (Tcyc = 4 * Tclk)
All PICs can be run from DC to their maximum spec’d speed:
12C50x 4MHz
12C67x 10MHz
16Cxxx 20MHz
17C4x / 17C7xxx 33MHz
18Cxxx 40MHz
ele.eng 30-10-2004, 11:10 PM The PIC Family: Program Memory
PIC program space is different for each chip.
Some examples are:
12C508 512 12bit instructions
16C71C 1024 (1k) 14bit instructions
16F877 8192 (8k) 14bit instructions
17C766 16384 (16k) 16bit instructions
The PIC Family: Program Memory
PICs have two different types of program storage:
1. EPROM (Erasable Programmable Read Only Memory)
Needs high voltage from a programmer to program (~13V)
Needs windowed chips and UV light to erase
Note: One Time Programmable (OTP) chips are EPROM chips,but with no window!
PIC Examples: Any ‘C’ part: 12C50x, 17C7xx, etc.
ele.eng 30-10-2004, 11:17 PM The PIC Family: Program Memory
PICs have two different types of program storage:
2. FLASH
Re-writable (even by chip itself)
Much faster to develop on!
Finite number of writes (~100k Writes)
PIC Examples: Any ‘F’ part: 16F84, 16F87x, 18Fxxx (future)
The PIC Family: Data Memory
PICs use general purpose “file registers” for RAM
(each register is 8bits for all PICs)
Some examples are:
16C71C 36 Bytes RAM
12C508 25 Bytes RAM
16F877 368 Bytes (plus 256 Bytes of nonvolatile EEPROM)
17C766 902 Bytes RAM
Don’t forget, programs are stored in program space (not in data space), so low RAM values are OK.
ele.eng 31-10-2004, 11:16 PM Register file Map (RFM)
RFM is a layout of all the registers available in a microcontroller and its extremely usefull when prpgramming , its divided into two parts:-
Special Function Register (SFR)
SFR is a collection of registers used by the CPU and peripheral functions to control the internal device operations of the microcontroller
General Purpose Tegister (GPR)
On the PIC16f84 device there are 68 GPR registers used for storing temporary variables
The PIC Family: Control Registers
PICs use a series of “special function registers” for controlling peripherals and PIC behaviors.
Some examples are:
STATUS Bank select bits, ALU bits (zero, borrow, carry)
INTCON Interrupt control: interrupt enables, flags, etc.
TRIS Tristate control for digital I/O: which pins are ‘floating’
TXREG UART transmit register: the next byte to transmit
ele.eng 31-10-2004, 11:22 PM The PIC Family: Peripherals
Different PICs have different on-board peripherals
Some common peripherals are:
Tri-state (“floatable”) digital I/O pins
Analog to Digital Converters (ADC) (8, 10 and 12bit, 50ksps)
Serial communications: UART (RS-232C), SPI, I2C, CAN
Pulse Width Modulation (PWM) (10bit)
Timers and counters (8 and 16bit)
Watchdog timers, Brown out detect, LCD drivers
PIC Peripherals: Ports (Digital I/O)
All PICs have digital I/O pins, called ‘Ports’
the 8pin 12C508 has 1 Port with 4 digital I/O pins
the 68pin 17C766 has 9 Ports with 66 digital I/O pins
Ports have 2 control registers
TRISx sets whether each pin is an input or output
PORTx sets their output bit levels
Most pins have 25mA source/sink (directly drives LEDs)
WARNING: Other peripherals SHARE pins!
ele.eng 31-10-2004, 11:25 PM Register file Map (RFM)
RFM is a layout of all the registers available in a microcontroller and its extremely usefull when prpgramming , its divided into two parts:-
Special Function Register (SFR)
SFR is a collection of registers used by the CPU and peripheral functions to control the internal device operations of the microcontroller
General Purpose Tegister (GPR)
On the PIC16f84 device there are 68 GPR registers used for storing temporary variables
The PIC Family: Control Registers
PICs use a series of “special function registers” for controlling peripherals and PIC behaviors.
Some examples are:
STATUS Bank select bits, ALU bits (zero, borrow, carry)
INTCON Interrupt control: interrupt enables, flags, etc.
TRIS Tristate control for digital I/O: which pins are ‘floating’
TXREG UART transmit register: the next byte to transmit
ele.eng 31-10-2004, 11:28 PM PIC Peripherals: USART: USRT
Synchronous communication: i.e., with clock signal
SPI = Serial Peripheral Interface
3 wire: Data in, Data out, Clock
Master/Slave (can have multiple masters)
Very high speed (1.6Mbps)
Full speed simultaneous send and receive (Full duplex)
I2C = Inter IC
2 wire: Data and Clock
Master/Slave (Single master only; multiple masters clumsy)
Lots of cheap I2C chips available; typically < 100kbps(For example, 8pin EEPROM chips, ADC, DACs, etc.)
PIC Peripherals: Timers
Available in all PICs.
14+bit cores may generate interrupts on timer overflow.
Some 8bits, some 16bits, some have prescalers
Can use external pins as clock in/clock out(ie, for counting events or using a different Fosc)
Warning: some peripherals share Timer resources
ele.eng 31-10-2004, 11:31 PM PIC Peripherals: CCP Modules
Capture/Compare/PWM (CCP)
10bit PWM width within 8bit PWM period (frequency)
Enhanced 16bit cores have better bit widths
Frequency/Duty cycle resolution tradeoff
19.5KHz has 10bit resolution
40KHz has 8bit resolution
1MHz has 1bit resolution (makes a 1MHz clock!)
Can use PWM to do DAC - See AN655
Capture counts external pin changes
Compare will interrupt on when the timer equals the value in a compare register
PIC Peripherals: Misc.
Sleep Mode: PIC shuts down until external interrupt (or internal timer) wakes it up.
Interrupt on pin change: Generate an interrupt when a digital input pin changes state (for example, interrupt on keypress).
Watchdog timer: Resets chip if not cleared before overflow
Brown out detect: Resets chip at a known voltage level
LCD drivers: Drives simple LCD displays
Future: CAN bus, 12bit ADC, better analog functions
VIRTUAL PERIPHERALS:
Peripherals programmed in software. UARTS, timers, and more can be done in software (but it takes most of the resources of the machine)
ele.eng 31-10-2004, 11:35 PM TRISA and PORTA Registers
Port A is a 5-bit wide port. Port pins 0 to 3 (i.e. RA0-RA3)
CMOS output drivers
PIN RA4 has an open drain output and should be connected to the supply voltage with suitable pull-up resistor when used as an output.
Each port pin has a direction control bit stored in register TRISA
Setting a bit in TRISA makes the corresponding PORTA pin an input.
Clearing a TRISA bit makes the corresponding PORTA pin an output
Ex. To makes bits 0 and 1 of port A input and the other bits output, we have to load the TRISA register with :
00000011
PORTA register address is 05 and the TRISA addres is 85 (HEXADECIMAL)
TRISB and PORTB Registers
Port B is an 8-bit wide bi-directional port
The corresponding data direction register is TRISB
A ‘0’ in any TRISB position sets the corresponding port B pins to outputs.
ele.eng 31-10-2004, 11:44 PM وهيك قد نكون انتهينا من المقدمة وان شاء الله يكون الجميع قد استفاد من هذه المقدمة لاني بصراحة مش شايف اي سؤال واي استفسار ابتداء من الاسبوع القادم سوف نضع الاشياء العملية والتجهيزات التي يمكن ان نبرمج عليها pic والبرنامج الخاص في البرمجة فكونو معنا ولا تكونو علينا
اخوانكم المخلصين
ele.eng
aub haseen
التحية كل التحية لكم
فهد الرفاعي 31-10-2004, 11:59 PM بارك الله فيكما اخواني ابو حسن وele.eng واتمنى تقديم الافضل كعادتكما
ele.eng 01-11-2004, 10:04 PM شكرا لك اخي وان شاء الله نكون عند حسن ظنكم فينا وان شاء الله نكون قد وصلنا المعلومة
تحياتنا لكم
مهندس الاتصالات 02-11-2004, 08:39 PM نشكرك أخي على هذا الجهد الطيب وان ش1ء الله الى مزيد من التطور والتقدم
ayadrashid11 05-11-2004, 12:39 AM جزاك الله خيرا
bodda105 17-11-2004, 06:35 AM جزاك الله كل خير
محمود العدل 18-11-2004, 04:29 PM السلام عليكم ورحمه الله وبركاته
اشكركم كثيرا علي هذه الدوره فعلا انا محتاج لهل جدا وجزاكم الله الف خير
bigbrother 25-11-2004, 12:14 PM السلام عليكم انا طالب هندسة كهربائية ومحتاج معلومات كتير عن ال pic اذا بتقردر تساعدني وتبعتلي معلومات عنها اكثر بكون شاكر ابعتلي اياهم على الايميل ايميلي ahmad_sheta2003@hotmail.com
karim 27-01-2005, 12:01 AM assalmo aliakom
i had password bios with my xe3, do you can help me to romove it.
i heard that stored this password in eeprom.
how can i do for romving it please.
and wish program that can i use it?
salhonline 02-02-2005, 05:40 AM شكرا اخي الكريم علي هذه الدورة الهامة جدا
ولكن عندي طلب بسيط!!!
هل من الممكن شرح البرمجة باستخدام ال(pic basic)
اتمني ان تهتم بطلبي
وجزاك الله خيرا
mimih 03-02-2005, 11:26 PM السلام عليكم ورحمه الله وبركاته
اشكركم كثيرا على هده الدورة القيمة ولاكن لو كانت بالغة العربية لكانت أكثر نفعا لنا نحن العرب لخدمت أخواننا اللدين يجدون صعوبة في الفهم باللغة الانجليزية.
و السلام عليكم ورحمه الله وبركاته.
الشهاوى 21-10-2005, 08:39 PM ارجو من الاخ الكريم ان يبسط الشرح للغه العربيه بعض الشىء لكى يتفيد باقى الاعضاء ولو انى اعرف تمام العلم ان هذة العلوم لاتنفع شرحها بالعربى واسفاه انى فنى ليس مهندش وشاغوف انى اتعلم هذا المجال الشيق مجدى فنى كهرباء والكترونيات تحكم
FOX2002 25-10-2005, 05:42 PM السلام عليكم ورحمه الله وبركاته
اشكركم كثيرا على هده الدورة القيمة ولاكن لو كانت بالغة العربية لكانت أكثر نفعا لنا نحن العرب لخدمت أخواننا اللدين يجدون صعوبة في الفهم باللغة الانجليزية.
و السلام عليكم ورحمه الله وبركاته.
أولا شكرا على الموضوع
ثانيا أدعم اقتراح الأخوة بخصوص الغة
|
|