Friday, 18 December 2015

Project Costing

Description
Unit/Price (RM)
Quantity (pc)
Price (RM)
Donut board
4.50
1
4.50
SILICON LABS  TOOLSTICK850-B-SK 
44.00
1
44.00
LCD 16x2
20.00
1
20.00
Crystal 11.0592 MHz
1.60
1
1.60
Crystal 33 MHz
1.60
1
1.60
Capacitor 30pF
0.30
2
0.60
Resistor 330 Ω
0.15
1
0.15
Resistor pack
2.00
1
2.00
Capacitor 10 uF
0.15
1
0.15
Pushbutton switch
1.00
1
1.00
7805 IC 5V voltage regulation
1.50
1
1.50
Capacitor 4.7 uF
0.15
2
0.30
Resistor 330 Ω
0.15
1
0.15
RTC DS1307
4.00
1
4.00
3v Battery
4.00
1
4.00
3v Battery holders
2.15
1
2.15
Buzzer
1.80
1
1.80
Bread board
16.00
1
16.00


TOTAL
RM105.5


TOTAL with 6% GST
RM111.8

Project Run Successfully


This is the latest video for our School bell time that was mention by my partner Arif Syazwan from the previous post. Alhamdulillah, everything was run smoothly. Last, we would like to thanks our lecturer Dr Zulkhairi for giving us so much knowledge and giving us the opportunity to try using new hardware replacing the PIC8051 that is the Silicon Lab Toolstick850. It was hard at the beginning because it was new to all the students but with Dr Zulkhairi guidance, we manage to make this project successfully.  

In the end, we would like to apologize to Dr Zulkhairi if we ever did anything wrong and thank you so much Dr Zulkhairi. May Allah bless all of us.

Thursday, 17 December 2015

SUCCCED

The last post is about the program problem but after figure the problem why the program some time have problem to operate according to the code and jump to starting again and again.

This problem happen because there a watch built-in in TOOLSTICK. This watchdog/watchdog timer is a hardware timer that automatically generates a system reset if the main program neglects to periodically service it. It is often used to automatically reset an embedded device that hangs because of a software or hardware fault.

So to remove this watchdog timer, i have to direct supply the TOOLSTICK with 5V.


and i have change the PIN for PORT 1.2 to PORT 1.4 because

"This example code takes and averages 2048 analog measurements from input
P1.2 (Potentiometer input) using ADC0. This measurement can be viewed by
halting the example, or by connecting the device's UART to a UART receiver."

the potentiometer effect the I/O P1.2


Below is THE SUCCESS video

Saturday, 12 December 2015

Friday, 11 December 2015

Thursday, 10 December 2015

INTERFACING WITH TOOLSTICK

Today we will Program the flash to toolstick.

The code must be change at

Using keil, we using 
 #include <reg51.h> 

but in Simplicity Studio we ne to change it to

#include <SI_C8051F850_Register_Enum.h>
#include "InitDevice.h"

so that the toolstick know each port we are using.
There are also different at void main() section
We must include this code before flash the program

IF we do not add this code, the code will not sent output to I/O port.

enter_DefaultMode_from_RESET();

This code also IMPORTANCE before flash the program.

PS;/ This code have been tested with example with or without the require code.



Wednesday, 9 December 2015

FLASH PROGRAM TO TOOLSTICK

To program the TOOLSTICK first connect the USB adapter


and connect the kit at the back of the USB adapter


HOW I FLASH PROGRAM TO TOOLSTICK

Firstly, i open the code that i want to burn

Second, focus on the top icon

the USB must detect the KIT before we can flash the program. If the program detect on my computer,
Before i flash the program WE MUST click this icon first,


Then, click on the second icon to transfer the code to TOOLSTICK


After FINISH the flash..DISCONNECT the USB and PLUG the USB adapter back in to receive the POWER.

PS;/ IF you miss to CLICK the HAMMER ICON , the toolstick will HAVE PROBLEM to understand the program. 

EXAMPLE FOR FIRST TRY WITHOUT CLICK THE HAMMER ICON



TESTING CODING AND RTC USING 89s51

We testing the RTC and the coding using 89s51 before implement on TOOLSTICK. 


SIMULATION FIRST CODE


SIMULATION SECOND CODE


The coding work find with the SECOND CODE and show the time and date.





Tuesday, 8 December 2015

CHANGING FROM DS12887 to DS1307

We need to change the RTC from DS12887 to DS1307. This is because the I/O port of toolstick only have 16-18 pin only.
In this project we are using 8 BIT LCD using port 0 and 2 pin from port 1, so, the I/O port only have less than 7 to 8 pin.

DS12887
DS1307



Below we show the data of both RTC and bold the required PIN to operate the RTC



DS12887

The DS12885, DS12887, and DS12C887 real-time clocks (RTCs) are designed to be direct replacements for the DS1285 and DS1287. The devices provide a real-time clock/calendar, one time-of-day alarm, three maskable interrupts with a common interrupt output, a programmable square wave, and 114 bytes of battery-backed static RAM (113 bytes in the DS12C887 and DS12C887A). The DS12887 integrates a quartz crystal and lithium energy source into a 24-pin encapsulated DIP package. The DS12C887 adds a century byte at address 32h. For all devices, the date at the end of the month is automatically adjusted for months with fewer than 31 days, including correction for leap years. The devices also operate in either 24-hour or 12-hour format with an AM/PM indicator. A precision temperature-compensated circuit monitors the status of VCC. If a primary power failure is detected, the device automatically switches to a backup supply. A lithium coin-cell battery can be connected to the VBAT input pin on the DS12885 to maintain time and date operation when primary power is absent. The device is accessed through a multiplexed byte-wide interface, which supports both Intel and Motorola modes.

DS12885, DS12887, DS12887A, DS12C887, DS12C887A: Typical Operating Circuit

Key Features

  • Drop-In Replacement for IBM AT Computer Clock/Calendar
  • RTC Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Through 2099
  • Binary or BCD Time Representation
  • 12-Hour or 24-Hour Clock with AM and PM in 12-Hour Mode
  • Daylight Saving Time Option
  • Selectable Intel or Motorola Bus Timing
  • Interfaced with Software as 128 RAM Locations
  • 14 Bytes of Clock and Control Registers
  • 114 Bytes of General-Purpose, Battery-Backed RAM (113 Bytes in the DS12C887 and DS12C887A)
  • RAM Clear Function (DS12885, DS12887A, and DS12C887A)
  • Interrupt Output with Three Independently Maskable Interrupt Flags
  • Time-of-Day Alarm Once Per Second to Once Per Day
  • Periodic Rates from 122µs to 500ms
  • End-of-Clock Update Cycle Flag
  • Programmable Square-Wave Output
  • Automatic Power-Fail Detect and Switch Circuitry
  • Optional 28-Pin PLCC Surface Mount Package or 32-Pin TQFP (DS12885)
  • Optional Encapsulated DIP (EDIP) Package with Integrated Crystal and Battery (DS12887, DS12887A, DS12C887, DS12C887A)
  • Optional Industrial Temperature Range Available

DS1307

The DS1307 serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I²C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply. Timekeeping operation continues while the part operates from the backup supply.

DS1307: Typical Operating Circuit

  • Completely Manages All Timekeeping Functions
    • Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100
    • 56-Byte, Battery-Backed, General-Purpose RAM with Unlimited Writes
    • Programmable Square-Wave Output Signal
  • Simple Serial Port Interfaces to Most Microcontrollers
    • I2C Serial Interface
  • Low Power Operation Extends Battery Backup Run Time
    • Consumes Less than 500nA in Battery-Backup Mode with Oscillator Running
    • Automatic Power-Fail Detect and Switch Circuitry
  • 8-Pin DIP and 8-Pin SO Minimizes Required Space
  • Optional Industrial Temperature Range: -40°C to +85°C Supports Operation in a Wide Range of Applications
  • Underwriters Laboratories® (UL) Recognized

Sunday, 6 December 2015

Saturday, 5 December 2015

Friday, 4 December 2015

Wednesday, 2 December 2015

TESTING ToolStick C8051F850

Today, we are testing toolstick and Simplicity Studio. We install Simplycity Studio software that provided in sililab website. There are two option to operate in windows:

First, we install Online/BETA version because the size is smaller that OFFLINE version. After done installing Simplycity in our laptop, it seem not detecting of USB and toolstick. After testing with different of windows we have discover the problem..


We need to install the OFFLINE version, so software can detect what type of MCU we are using.