Home | BOOKs | Q from Mail | Products |About

 BOOK Index
- All About CCS C  
- PIC Works
- AVR Book 2
- AVR Book 1
-
MCS-51 Begin
 


 

All Abouc CCS C
PIC C Programming กับ CCS C คอมไพเลอร์

 

PIC Works
Examples and C Source Code.


 

 
Javelin Stamp Microcontroller
Javelin Stamp นำโลกของไมโครคอนโทรลเลอร์มาสู่ชาว Java developer
จุดเริ่มต้นการเรียนรู้การเขียนโปรแกรมภาษา Java ผ่าน Javelin (ซับเซ็ตของภาษาจาวา) ที่ง่ายกว่า

โค้ดโปรแกรมอ่านเขียน EEPROM 24LCxxx กับ Javelin Stamp
 
// include Package stamp.core
import stamp.core.*;
// include Package stamp.protocol
import stamp.protocol.I2C;
// include Package stamp.peripheral.memory.eeprom
import stamp.peripheral.memory.eeprom.*;

/**
* Program : Read/Write 24LC16 eeprom
* class : RW_24LC16
* @version : 1.0
* @Date : 04/05/2007
* @author : Prajin Palangsantikul
*/

public class RW_24LC16 {
  // Create an I2C bus object named i2cbus.
 
final public static int SDAPin = CPU.pin13;
  final public static int SCLPin = CPU.pin14;

  public static I2C i2cbus = new I2C(SDAPin, SCLPin);
  // Create a MC24LC32LibExample object named eeprom0 using the i2cbus object.
  // Address chip :A2,A1,A0 -> 0
 
public static MC24LC32LibEx ee16 = new MC24LC32LibEx (i2cbus, 0);

  // Declare StringBuffer object and static variables.
 
public static StringBuffer characters = new StringBuffer(128);

  public static void main() {
    int i, data;
    int eeAddress = 0;

    System.out.println("Wirte EEPROM");
    for(i=0;i<3;i++) {
       ee16.writeByte(eeAddress, 99);
       eeAddress = eeAddress + 1;
       System.out.println(i);
    }

    System.out.println("Read EEPROM");
    for(i=0;i<10;i++) {
        data = ee16.readByte(i);
       System.out.println(data);
    }

    while(true){
        ;
    } // End while(true)
 
} // End main
} // End class


 

 


 New BOOK

ซื้อได้ที่ Bits Controller (ชั้น 2 บ้านหม้อพลาซ่า)

Apply C Programming for AVR Microcontroller
(Book 2)

 


 

รายละเอียด

MCS-51 Microcontroller
Training Book

Begin
for you

การเขียนโปรแกรมควบคุมไมโครคอนโทรลเลอร์ AVR ด้วยภาษา C กับ WinAVR (C Compiler)


 Links
Microchip
ATmel AVR
WinAVR C Compiler
AVR Freaks
Atmel AVR Function Library
FreeRTOS
AvrX RTOS
AVR Bootloaders
AVR-Projects

AVR-Arduino
Wiring

java.com - Hot Games, Cool Apps




 


www.appsofttech.com