Friday, 15 June 2012

Glimpse of Android

     Android is one of the operating system for mobile phones Linux-based. And Android is a mobile device that includes the system operations, middleware. Android provides an open platform that can developed by developers for their own applications for use on various mobile devices.
      In 2005 Google's Android Inc. at the time led by Andy Rubin, Rich Miner, Nick Sears and chris white. Which later in the year it also started intensive build Android platform. 12 November 2007 Google with the Open Handset Alliance (OHA) is an open consortium of mobile devices, Google released the Android SDK, after announcing a week earlier. And his speech was remarkable, almost all of the news media on IT & Programming preach about the release of the Android SDK (Software Development Kit) is. SDK provides tools and APIs needed to develop applications on the Android platform with the Java programming language.
      In this world there are two types of distributors operating system Android. first are fully supported by Google or Google Mail Services (GMS) and the second is a completely free distribution without the direct support of Google's otherwise known as the Open Handset Distribution (OHD).

LCD Program Using Bascom-8051

     In this program the data mode used is mode 4 data bits, so it is used only DB4 - DB7. If the microcontroller is only used to write characters to the LCD then the pin R / W can be connected to the ground. Potentiometer used to adjust the contrast of the displayed character.

'Program LCD_1.bas
'Program untuk menampilkan pesan teks sederhana pada LCD
'Inisialisasi LCD
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P2.4 , Db5 = P2.5 , Db6 = P2.6,
Config Lcdpin = Pin , Db7 = P2.7 , E = P2.2 , Rs = P2.0
P2.1 = 0                      'R/W=0

Cursor Off                         
Lcd "Sistem Komputer Gunadarma"
Lcd "Kalimalang"


Bascom-8051 Programming

     Bascom-8051 using a Basic compiler is a program based on Windows which can be used for the 8051 microcontroller family, for example AT89S51/52/55 and AT89S2051/4051. Demo version of Bascom-8051 developed by MCS Electronic can be downloaded at freely. For the demo version of the code that can be created and executed the microcontroller is limited amount of up to 4 KBytes, but this is not a problem because according to the internal program storage capacity on the AT89S51.
      In general, the language used to program the microcontroller Assembly language is. Assembly language is a medium-level programming languages​​, where programs are made closer to machine language, so pemenfaatan optimal memory can be done, but on the other side of its programming to be relatively difficult.
     Because the language used Bascom, namely Basic, the language level high, then the programming using Bascom is easy to learn. The syntax is not much different from Basic in general, such as do-loops, for-next,
while-wend, goto, gosub, and so forth. In addition Bascom equipped with special functions, such as an LCD to display characters on LCD, PRINT to send characters to the PC via RS232 cable, and SHIFTOUT SHIFTIN to synchronous serial communication, and so forth. Special functions if written in Assembly language will become more lengthy and complicated, especially because we must know that there are registers in the microcontroller.

Ticker in JAVA MIDlet

    Ticker object can be associated with a subclass of Screen objects. Ticker is an object in the form of walking or writing a line of text that can discrolling constantly on display. Direction and speed of the Ticker can not be set manually, because it has been governed by the system and ongoing Ticker can not be stopped by the application. The following is a sample program Ticker.

       1     import javax.microedition.midlet.*;
       2     import javax.microedition.lcdui.*;
       4     public class TickerDemo extends MIDlet
implements CommandListener
       5     {
       6               private Form  form;
       7               private Ticker  ticker;
       8               private Display  display;
       9               private Command  cmdKeluar;
      11             public TickerDemo () {
      12             }
      14             public void startApp()        {
      15             form = new Form("Latihan Membuat Ticker");
      16             ticker = new Ticker("Lab Sist Komp Lanjut");
      17             form.setTicker(ticker);
      18             display=Display.getDisplay(this);
      19             display.setCurrent(form);
      20             cmdKeluar = new Command ("Keluar", Command.EXIT, 0);
      21             form.addCommand(cmdKeluar);
      22             form.setCommandListener(this);
      23              }
      25             public void pauseApp()        {
      26             }
      28             public void destroyApp(boolean unconditional)              {
      29             notifyDestroyed();
      30             }
      32             public void commandAction(Command c, Displayable d) {
      33             if (c == cmdKeluar)  {
      34             destroyApp(true);
      35             }
      36              }
      37     }

Output : 

Form in JAVA MIDlet

     Form can be considered as a page for entering data. form may consist of components commonly referred to as items. collection of items that exist in a form on the concept stored in the array, so that accessing can be done using the index. The following example Form program in java MIDlet.

       1    import javax.microedition.midlet.*;
       2    import javax.microedition.lcdui.*;
       4    public class FormDemo extends MIDlet implements CommandListener
       5      {
       6              private Form form;
       7              private Display display;
       8              private Command cmdKeluar;
      10             public FormDemo () {
      11             }
      13             public void startApp()        {
      14             form = new Form("Latihan Membuat Form");
      15             form.append("MIDlet pertamaku!");
      16             display=Display.getDisplay(this);
      17             display.setCurrent(form);
      19             cmdKeluar = new Command ("Keluar", Command.EXIT, 0);
      20             form.addCommand(cmdKeluar);
      21             form.setCommandListener(this);
      22             }
      24             public void pauseApp()        {
      25             }
      27             public void destroyApp(boolean unconditional)              {
      28             notifyDestroyed();
      29             }
      31             public void commandAction(Command c, Displayable d ) {
      32             if ( c  == cmdKeluar ) {
      33             destroyApp(true);
      34             }
      35             }
      36   }

Output :

Fundamental Difference Between ATMEGA8535 and AT89S51

Features of the ATMEGA8535 microcontroller is as follows:

1) Channel I / O as much as 32 pieces, the port A, Port B, Port C and Port D.
2) 10-bit ADC with 8 channels.
3) Three Timer / Counter with benchmarking capabilities.
4) CPU register consists of 32 pieces.
5) Watchdog Timer with Internal Oscillator.
6) as much as 512 bytes of SRAM.
7) Flash Memory at 8 kb to Read While Write capability.
8) Unit internal and external interrupts.
9) Port SPI interface.
10) a 512 byte EEPROM can be programmed during the operation.
11) analog comparator interface.
12) Port USART for serial communication.

Features of the AT89S51 microcontroller is as follows:

1) A CPU (Central Processing Unit) 8 bits including MCS51 family.
2) internal oscillator and timing circuits, 128 bytes of internal RAM (on chip).
3) Four programmable I / O ports, each consisting of 8 lines I / O
4) Two 16-bit Timer Counter.
5) Five of the interrupt lines (2 external interrupts and internal interrupts 3)
6) A serial port with full duplex UART serial control.
7) Ability to perform multiplication, division and Boolean operations (bit)
8) The speed of execution of instructions per cycle 1 microdetik at 12 MHz clock frequency
9) 4 Kbytes Flash ROM that can be loaded and removed up to 1000 times
10) In-System Programmable Flash Memory
BASIC IT | © 2010 by | Supported by Promotions And Coupons Shopping & WordPress Theme 2 Blog