Welcome, Guest. Please login or register.
Did you miss your activation email?
October 25, 2016, 05:31:34 17:31

Login with username, password and session length

Pages: [1]
Author Topic: PIC18F4550 Hardware Cron Implementation - School Project  (Read 1966 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline

Posts: 23

Thank You
-Given: 10
-Receive: 26

« on: November 23, 2012, 04:41:22 04:41 »

Here's a simple PIC18F4550 bsaed Hardware Chron Scheduler Implementation we have developed as a school project.

This device allows for scheduling of AC Switches controlled by 5VDC-220VAC Relays connected to the scheduling ports. The CRON-like syntax is prepared using a C# Winform Application, then using a HID Library for C# is transferred to the PIC. MikroC is used to program the PIC. All source code for software and firmware and proteus design/testing files are in this github link.

The device does not need to connect to a PC when it's operating as a scheduler, only when loading Cron-like schedule to it. The device will just loop through each instance of the schedule then perform date/time calculations to see if it's due for implementation. The following is an excerpt from our papers.

Cron is the time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email.

The Cron standard is used as basis for scheduling data for this project. The widespread use and adaption of Cron in the software industry will increase the usage familiarity of our device for different applications. It is thus very new that the Cron standard is adapted for hardware scheduling as is the main focus of this project.

Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication and power supply between computers and electronic devices.

USB was designed to standardize the connection of computer peripherals, such as keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters to personal computers, both to communicate and to supply electric power. It has become commonplace on other devices, such as smart phones, PDAs and video game consoles. USB has effectively replaced a variety of earlier interfaces, such as serial and parallel ports, as well as separate power chargers for portable devices.

USB human interface device class (USB HID class) is a part of the USB specification for computer peripherals: it specifies a device class (a type of computer hardware) for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices. This specification will be utilized by the project in order to facilitate low level interfacing with the PC and the device.

As of 2008, approximately 6 billion USB ports and interfaces were in the global marketplace, and about 2 billion were being sold each year. Given the widespread use and adaption of the USB standard, it will add improvement to our device if we use the USB as both the primary power source and interface bus with the PC.

IC generically referred to as "two-wire interface is a multi-master serial single-ended computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard, embedded system, cell phone, or other electronic device. Since the mid 1990s, several competitors (e.g., Siemens AG (later Infineon Technologies AG, now Intel mobile communications), NEC, Texas Instruments, STMicroelectronics (formerly SGS-Thomson), Motorola (later Freescale), Intersil, etc.) brought IC products on the market, which are fully compatible with the NXP (formerly Philips's semiconductor division) IC-system. The widespread use of the IC interface allows for the project to be easily integrated with each subcomponent within it.

A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.

PIC is a family of modified Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller". The PIC18F4550 is the Microcontroller to be used for the projects implementation of the device.

EEPROM is user-modifiable read-only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through the application of higher than normal electrical voltage generated externally or internally in the case of modern EEPROMs. EPROM usually must be removed from the device for erasing and programming, whereas EEPROMs can be programmed and erased in-circuit. Originally, EEPROMs were limited to single byte operations which made them slower, but modern EEPROMs allow multi-byte page operations.

EEPROMs also have a limited life - that is, the number of times it could be reprogrammed was limited to tens or hundreds of thousands of times. That limitation has been extended to a million write operations in modern EEPROMs. In an EEPROM that is frequently reprogrammed while the computer is in use, the life of the EEPROM can be an important design consideration. It is for this reason that EEPROMs were used for configuration information, rather than random access memory. The Atmel AT24C16 IC is used for the implementation of the device.

A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time. The DS1307 real time clock by Maxim is used for the implementation of the projects device.

Although keeping time can be done without an RTC, using one has benefits. Low power consumption, (important when running from alternate power); Frees the main system for time-critical tasks; and finally it is sometimes more accurate than other methods.

Also there's an attempted NodeJS implementation which allows for access of the device server through the internet or wireless via wifi tech it was never completed. But I know it can be finished, we just didn't have enough time to complete it as it was a school project and the deadline was fixed.

The project outlines basic use of the following in MicroC
  • External EEPROM - Atmel AT24C16
  • Real Time Clock - DS1307 real time clock
  • USB HID - PIC184550 USB Module
  • USB HID PC SIDE - HidLibrary for C#

This is my first post here in Sonsivri. If you have any questions please feel free to reply here.

A direct link to the detailed PDF Documentation for the project is here:
« Last Edit: November 23, 2012, 04:56:59 04:56 by Iliganon » Logged
Pages: [1]
Jump to:  


... Copyright 2003-2999 ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC