Saturday, November 7, 2009
Friday, October 9, 2009
draft oh draft..
Thursday, September 17, 2009
Design the circuit
Thursday, September 10, 2009
Block Diagam and Flow Chart
This block diagram represent the flow of circuit that is used inside the remote and at the home application such as fan, light, home ventilation, or home surveillance.
Flow chart of this project
This flow chart represent the flow the systems of this project. From this flow chart, you can design the program for this project.
Overall costing of this project
Thursday, September 3, 2009
Interface between SKXBee and Microcontroller
Thursday, August 27, 2009
The Proposal
Friday, August 21, 2009
WinPic 800
Thursday, August 20, 2009
CCS C Compiler
The CCS C compiler supports the microchip PIC12X. PIC16X, PIC18X and dsPIC device.
- PCB Compiler supports PIC16C5X
- PCM Compiler supports PIC16C6X, 7X, 77X, 8X, 8XX & 9X.
- Built in libraries for all PICs, RS232, I/O, I2C, and delay.
- Integrates with MPLAB and other simulators/emulators for source level debugging
- Formatted print allows easy formatting in Hex or Dec.
- Efficient function implementation allows call trees deeper than the hardware stack
- Access to hardware from C functions: Timers, A/D, E2, SSP, PSP, I2C
- 18 and 16 bit types
- Assembly code may be inserted anywhere in source and may reference C variables
- Automatic linking handles multiple code pages
- Inline procedures supported to save stack space, linker automatically determines optimum architecture
- Standard one bit type (short int) permits the compiler to generate efficient bit oriented code
- #BIT and #BYTE allow C variables to be placed at absolute addresses to map to C variables
- IRQ procedures supported on PCM. Start-up and clean-up code is generated
- Updates via modem for 30 days included
The CCS C compiler is one of the C compiler that manufactured by CCS. C compiler is a computer program or set of program that transforms source code written in a computer language (C++ language) into another computer language (binary form).
When you want to use the CCS C compiler,
- First you have to download the CCS C Compiler.
- After that, double click the PIC C compiler icon on the desktop.
- Click at the file picture on the left top of the PCW
- Then open the new file by clicking new-source file.
- Create your own program.
- After your program is complete, compile the program to make sure that there is no error. If there is an error of your programmig, you have to modified your program so that, the error will gone. If not, you cannot execute the program into the PIC.
To burn your program to the IC, you have to place the IC to the IC socket and connect the IC socket to the PIC programmer. By using the WinPIC 800 software, execute the program into the PIC. The IC socket and PIC programmer is one of the cytron product. You can buy it online from this web site http://www.cytron.com.my/ or you can buy it from other electronics distributer or shops. Another product from cytron that can used to burn the program to the IC is SK40B. SK40B has more function and much easier.
UIC00A (USB ICSP PIC Programmer) UIC-S (UIC00A socket)
Proteus 7 Professional
Proteus is a low-cost EDA package offering facilities for schematic drawing, SPICE simulation, and PCB layout. The ProSPICE simulation module also includes cosimulation of the PIC16F84 microcontroller, and a range of interactive peripheral models such as LCD displays, matrix keypads, and an RS232 terminal.
Proteus is an easy-to-use application for creating printed circuit-board layouts, and is good for hobbyists or students working on small projects. Proteus creates simple PCBs with 16 copper layers, two silk screens, and four user/mechanical layers, plus an autorouter. Completed designs are suitable for reports, tutorials. or articles. Proteus is a great program for creating PCBs.
The VSM advantage
The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and low-level micro-controller code in the context of a mixed-mode SPICE circuit simulation. With this Virtual System Modelling facility, you can transform your product design cycle, reaping huge rewards in terms of reduced time to market and lower costs of development.
If one person designs both the hardware and the software then that person benefits as the hardware design may be changed just as easily as the software design. In large organisations where the two roles are seperated, the software designers can begin work as soon as the schematics is completed. There is no need for them to wait until a physical prototype exists.
In short, Proteus VSM improves efficiency, quality and flexibility throughout the design process.
Proteus Virtual System Modelling (VSM) combines mixed mode SPICE circuit simulation, animated components and microprocessor models to facilitate co-simulation of complete microcontroller based designs. For the first time ever, it is possible to develop and test such designs before a physical prototype is constructed.
This is possible because you can interact with the design using on screen indicators such as LED and LCD displays and actuators such as switches and buttons. The simulation takes place in real time (or near enough to it): a 1GMHz Pentium III can simulate a basic 8051 system clocking at over 12MHz. Proteus VSM also provides extensive debugging facilities including breakpoints, single stepping and variable display for both assembly code and high level language source.
Friday, August 14, 2009
PIC16F877A Pin Description and features
Sunday, August 9, 2009
Communicate between two XBee
- Simply connect USB cable (B type) to SKXBee USB socket, another end (A type) to PC.
- Please refer to document named “USB Driver Installation Guide” for driver installation.
- Setup X-CTU with double-clicking the “setup_x-ctu.exe” file that can get from the SKXBee page.
- Launch the X-CTU Software and select the “PC Settings” tab. Verify the baud and parity settings of the COM port match those XBee Module. The virtual COM Port is normally located at the last port, USB serial Port.
- Choose the COM Port and click ‘Test/Query’ tab. Then, click ‘OK’.
- To modify or read XBee Module parameters, the module must first enter into Command Mode.
- First, select the ‘Terminal’ tab on X-CTU Software. To enter AT Command Mode, send the 3-character command sequence ‘+++” and XBee module will response ‘OK’ which means that it has already enter Command Mode.
- When a command is send to a module, the module will parse and execute the command. Upon successful execution of a command, the module returns an “OK” message. If execution of a command results in an error, module will return “ERROR” message.
- To exit AT Command Mode, send ATCN Command or if no valid AT Command are received within the time specified by CT (Command Mode Timeout) Command, the XBee Module automatically returns to Idle Mode. So, if another command need to send, ‘+++’ should be enter so that module will enter into Command Mode again.
To communicate between two SKXBee:
- Connect two SKXBee with two different computer.
- Then, do the procedure above at both computer to check the functionality of both SKXBee.
- Let name one SKXBee with SKXBee1 and onother one with SKXBee2.
- Source Address (MY) of SKXBee1 must be match to Destination Address (DL) of SKXBee2 and Destination Address (DL) of SKXBee1 must be match to Source Address (MY) of SKXBee2.
- After built connection between these two SKXBee, they can communicate among each other. Data sent by SKXBee1 will received by SKXBee2 and data sent by SKXBee2 will
received by SKXBee1. - Data which is sent is in blue color and data which is received is in red color. Below is example of data sent and received of SKXBee1 and SKXBee2 in X-CTU terminal.
Tuesday, August 4, 2009
ZigBee Application
MaxStream is a well-known manufacturer of components for wireless communication. ZigBee is one of the MaxStream products. There are two versions of ZigBee that are available from MaxStream which are XBee and XBee PRO. Both versions are functionally identical and pin compatible. The only difference is the transmit power, which is 1mW maximum for XBee and 63mW maximum for XBee PRO. ZigBee’s mission is to cut the traditional wires between sensors, wired slaves devices, and the microcontrollers and microprocessors they serve.
ZigBee is available in three difference antenna:-
1. Integrated into the chip. In this case the radiated energy is practically non-directional
2. With an antenna connector for attaching an external antenna.
3. With an integrated vertical (whip) antenna.
ZigBee can be interfaced quite easily via a standard serial port, such is commonly found in the microcontrollers (UART) or the COM port of a PC (RS232), at maximum rate baud of 115, 200. The XBee is powered from a 3.3v supply instead of 5v supply like most digital circuits.
There is a transmit buffer and a receive buffer, and each buffer provides a temporary parking place for 100 bytes. Data can arrive from both directions at the same time – the data to be transmitted coming from the UART, and the data received by the antenna from the RF link. When the antenna is receiving data, it cannot transmit data at the same time. For this reason, the data to be transmitted is parked in the transmit buffer for a while, and the received data is stacked up in the receive buffer. As soon as the data stream from the RF end stops, the XBee module switches the antenna from receive to transmit and empties the transmit buffer by sending its content out on the ether. At the same time, the UART empties the receive buffer by sending the data in it to your application. An application with a large amount of data to send can easily overload the transmit buffer. MaxStream provides a ‘full’ alarm to deal with this problem. As soon as the application has filled all but the last 17 bytes of the transmit buffer (which means 83 bytes are waiting to be transmitted), pin 12 goes high to signal to the system that it has to stop filling the buffer for a while. Pin 12 goes low again after the content of the transmit buffer has been reduced to 66 bytes. This can be regarded as a sort of software hysteresis.
The supply voltage must be decoupled by a 100-nF capacitor located as close as possible to pins 1 and 10. Communication is provided by pins 2 and 3, and the direction is indicated by arrows. Some of the pins are marked with an asterisk (*). These pins are reserved for certain functions that are not yet available from the manufacturer. When they are available, it can download from the MaxStream website and upgrade the XBee by flashing the firmware into the module. Up until then, simply leave them unconnected. The same applies to the pins marked NC (‘not connected’). Pin 5 is more important: logic 1 here (3.3 V) enables the module, while logic 0 disables it. A 10-k_ pull-up resistor from pin 5 to pin 1 ensures that the module will be enabled as soon as the supply voltage is applied. You have a choice of several functions for pin 9. An internal parameter determines which of them is active. The most important function is the sleep state. The module remains in deep sleep as long as the internal SM register is not at logic 0. Pin 7 provides a pulse-width modulated (PWM) signal proportional to the most recently received RF signal. It has a period of 8.32 ms, which corresponds to 120 Hz. Fans of LED bars and other light effects can convert it into an analogue signal and use it as a signal strength indicator (all you need is an RC network and an LM3914). This can also be done using software, since the strength of the most recently received signal is stored in the internal DB parameter.