27 maja 2008

Programowanie mikrokontrolerow AVR + AVR-Doper + USB + Linux + UBUNTU

Sesja z konfigurowana programatora AVR pod Lnuxem



$ sudo dmesg

...

[ 56.193165] NET: Registered protocol family 10
[ 56.193313] lo: Disabled Privacy Extensions
[ 56.193520] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 66.331696] nas0: no IPv6 routers present
[ 851.674370] usb 2-1: new low speed USB device using ohci_hcd and address 2
[ 851.912107] usb 2-1: configuration #1 chosen from 1 choice
[ 852.180868] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[ 852.189322] usbcore: registered new interface driver cdc_acm
[ 852.189896] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
[ 863.085900] usb 2-1: USB disconnect, address 2
[ 910.664830] usb 2-1: new low speed USB device using ohci_hcd and address 3
[ 910.902548] usb 2-1: configuration #1 chosen from 1 choice
[ 910.906498] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
$ avrdude -?
$ sudo ls /dev/ttyACM0
/dev/ttyACM0
$ sudo less /dev/ttyACM0
/dev/ttyACM0 is not a regular file (use -f to see it)
$ sudo less -f /dev/ttyACM0
$ avrdude -m t2313 -p /dev/ttyACM0
avrdude: invalid option -- m
Usage: avrdude [options]
Options:
-p Required. Specify AVR device.
-b Override RS-232 baud rate.
-B Specify JTAG/STK500v2 bit clock period (us).
-C Specify location of configuration file.
-c Specify programmer type.
-D Disable auto erase for flash memory
-i ISP Clock Delay [in microseconds]
-P Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U :r|w|v:[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a script.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E [,] List programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.

avrdude project:
$ avrdude -m t2313 -p /dev/ttyACM0 -c usbasp
avrdude: invalid option -- m
Usage: avrdude [options]
Options:
-p Required. Specify AVR device.
-b Override RS-232 baud rate.
-B Specify JTAG/STK500v2 bit clock period (us).
-C Specify location of configuration file.
-c Specify programmer type.
-D Disable auto erase for flash memory
-i ISP Clock Delay [in microseconds]
-P Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U :r|w|v:[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a script.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E [,] List programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.

avrdude project:
$ avrdude -m t2313 -P /dev/ttyACM0 -c usbasp
avrdude: invalid option -- m
Usage: avrdude [options]
Options:
-p Required. Specify AVR device.
-b Override RS-232 baud rate.
-B Specify JTAG/STK500v2 bit clock period (us).
-C Specify location of configuration file.
-c Specify programmer type.
-D Disable auto erase for flash memory
-i ISP Clock Delay [in microseconds]
-P Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U :r|w|v:[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a script.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E [,] List programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.

avrdude project:
$ qavrdude -m t2313 -P /dev/ttyACM0 -c usbasp


$ sudo mcedit /etc/udev/rules.d/

$ sudo mcedit /etc/udev/rules.d/65-programator.rules

$ sudo mcedit /etc/udev/rules.d/
00-init.rules 70-persistent-cd.rules
05-options.rules 70-persistent-net.rules
20-names.rules 75-cd-aliases-generator.rules
30-cdrom_id.rules 75-persistent-net-generator.rules
40-permissions.rules 80-programs.rules
45-fuse.rules 85-alsa.rules
45-hplip.rules 85-hdparm.rules
45-libgphoto2.rules 85-hplj10xx.rules
45-libsane.rules 85-hwclock.rules
50-xserver-xorg-input-wacom.rules 85-ifupdown.rules
55-hpmud.rules 85-pcmcia.rules
60-libpisock.rules 90-modprobe.rules
60-symlinks.rules 95-hal.rules
65-dmsetup.rules 99-udevmonitor.rules
65-persistent-input.rules libmtp.rules
65-persistent-storage.rules README
65-programator.rules
$ sudo mcedit /etc/udev/rules.d/6
60-libpisock.rules 65-dmsetup.rules 65-persistent-storage.rules
60-symlinks.rules 65-persistent-input.rules 65-programator.rules
$ sudo mcedit /etc/udev/rules.d/65-persistent-storage.rules

$ sudo mcedit /etc/udev/rules.d/65-programator.rules

$ avrdude -p m8 -c stk500v2 -P /dev/bus/usb/001/014
avrdude: ser_open(): can't open device "/dev/bus/usb/001/014": No such file or directory
$ avrdude -p m8 -c stk500v2 -P /dev/AVR
avrdude: ser_open(): can't open device "/dev/AVR": No such file or directory
$ avrdude -p m8 -c stk500v2 -P /dev/ttyACM0

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

$ avrdude -p m8 -c stk500v2 -P /dev/ttyACM0

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

$ avrdude -p t2313 -c stk500v2 -P /dev/ttyACM0

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

$ avrdude -p t2313 -c stk500v2 -P /dev/ttyACM0 -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ avrdude -p t2313 -c stk500v2 -P /dev/ttyACM0 -F
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/ttyACM0
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

$ modprobe usbserial
FATAL: Error inserting usbserial (/lib/modules/2.6.22-15-generic/kernel/drivers/usb/serial/usbserial.ko): Operation not permitted
$ sudo modprobe usbserial
$ udevinfo /dev/ttyACM0
missing option
$ sudo udevinfo /dev/ttyACM0
missing option
$ sudo udevinfo /dev/ttyACM0
missing option
$ udevinfo -a -p $(udevinfo -q path -n udevinfo -a -p $(udevinfo -q path -n /dev/sdb1))
$ dprobe usbserial
bash: dprobe: polecenie nieodnalezione
$
$ dprobe usbserial
bash: dprobe: polecenie nieodnalezione
$ FATAL: Error inserting us
$ udevinfo -a -p $(udevinfo -q path -n /dev/ttyACM0)

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/class/tty/ttyACM0':
KERNEL=="ttyACM0"
SUBSYSTEM=="tty"
DRIVER==""
ATTR{dev}=="166:0"

looking at parent device '/devices/pci0000:00/0000:00:03.1/usb2/2-1/2-1:1.0':
KERNELS=="2-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="cdc_acm"
ATTRS{modalias}=="usb:v16C0p05E1d0100dc02dsc00dp00ic02isc02ip01"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bInterfaceSubClass}=="02"
ATTRS{bInterfaceClass}=="02"
ATTRS{bNumEndpoints}=="01"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bmCapabilities}=="2"

looking at parent device '/devices/pci0000:00/0000:00:03.1/usb2/2-1':
KERNELS=="2-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{product}=="AVR-Doper"
ATTRS{manufacturer}=="obdev.at"
ATTRS{quirks}=="0x0"
ATTRS{maxchild}=="0"
ATTRS{version}==" 1.01"
ATTRS{devnum}=="3"
ATTRS{busnum}=="2"
ATTRS{speed}=="1.5"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{bNumConfigurations}=="1"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceClass}=="02"
ATTRS{bcdDevice}=="0100"
ATTRS{idProduct}=="05e1"
ATTRS{idVendor}=="16c0"
ATTRS{bMaxPower}=="200mA"
ATTRS{bmAttributes}=="80"
ATTRS{bConfigurationValue}=="1"
ATTRS{bNumInterfaces}==" 2"
ATTRS{configuration}==""
ATTRS{dev}=="189:130"

looking at parent device '/devices/pci0000:00/0000:00:03.1/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{serial}=="0000:00:03.1"
ATTRS{product}=="OHCI Host Controller"
ATTRS{manufacturer}=="Linux 2.6.22-15-generic ohci_hcd"
ATTRS{quirks}=="0x0"
ATTRS{maxchild}=="3"
ATTRS{version}==" 1.10"
ATTRS{devnum}=="1"
ATTRS{busnum}=="2"
ATTRS{speed}=="12"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bNumConfigurations}=="1"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceClass}=="09"
ATTRS{bcdDevice}=="0206"
ATTRS{idProduct}=="0000"
ATTRS{idVendor}=="0000"
ATTRS{bMaxPower}==" 0mA"
ATTRS{bmAttributes}=="e0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{configuration}==""
ATTRS{dev}=="189:128"

looking at parent device '/devices/pci0000:00/0000:00:03.1':
KERNELS=="0000:00:03.1"
SUBSYSTEMS=="pci"
DRIVERS=="ohci_hcd"
ATTRS{msi_bus}==""
ATTRS{broken_parity_status}=="0"
ATTRS{modalias}=="pci:v00001039d00007001sv00001849sd00007001bc0Csc03i10"
ATTRS{local_cpus}=="ff"
ATTRS{irq}=="17"
ATTRS{class}=="0x0c0310"
ATTRS{subsystem_device}=="0x7001"
ATTRS{subsystem_vendor}=="0x1849"
ATTRS{device}=="0x7001"
ATTRS{vendor}=="0x1039"

looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
ATTRS{uevent}==""

$ udevinfo -a -p $(udevinfo -q path -n /dev/ttyACM0)


$ avrdude -p t2313 -c avr_doper -P /dev/ttyACM0 -F -u -t | grep doper

avrdude: Can't find programmer id "avr_doper"

Valid programmers are:
dasa3 = serial port banging, reset=!dtr sck=rts mosi=txd miso=cts [/etc/avrdude.conf:770]
dasa = serial port banging, reset=rts sck=dtr mosi=txd miso=cts [/etc/avrdude.conf:757]
siprog = Lancos SI-Prog [/etc/avrdude.conf:744]
ponyser = design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts [/etc/avrdude.conf:731]
frank-stk200 = Frank STK200 [/etc/avrdude.conf:696]
blaster = Altera ByteBlaster [/etc/avrdude.conf:683]
ere-isp-avr = ERE ISP-AVR [/etc/avrdude.conf:673]
atisp = AT-ISP V1.1 programming cable for AVR-SDK1 from [/etc/avrdude.conf:663]
dapa = Direct AVR Parallel Access cable [/etc/avrdude.conf:652]
xil = Xilinx JTAG cable [/etc/avrdude.conf:639]
futurlec = Futurlec.com programming cable. [/etc/avrdude.conf:622]
abcmini = ABCmini Board, aka Dick Smith HOTCHIP [/etc/avrdude.conf:612]
picoweb = Picoweb Programming Cable, http://www.picoweb.net/ [/etc/avrdude.conf:602]
sp12 = Steve Bolt's Programmer [/etc/avrdude.conf:591]
alf = Nightshade ALF-PgmAVR, http://nightshade.homeip.net/ [/etc/avrdude.conf:575]
bascom = Bascom SAMPLE programming cable [/etc/avrdude.conf:565]
dt006 = Dontronics DT006 [/etc/avrdude.conf:555]
pony-stk200 = Pony Prog STK200 [/etc/avrdude.conf:543]
stk200 = STK200 [/etc/avrdude.conf:527]
bsd = Brian Dean's Programmer, http://www.bsdhome.com/avrdude/ [/etc/avrdude.conf:516]
pavr = Jason Kyle's pAVR Serial Programmer [/etc/avrdude.conf:508]
dragon_dw = Atmel AVR Dragon in debugWire mode [/etc/avrdude.conf:501]
dragon_hvsp = Atmel AVR Dragon in HVSP mode [/etc/avrdude.conf:493]
dragon_pp = Atmel AVR Dragon in PP mode [/etc/avrdude.conf:485]
dragon_isp = Atmel AVR Dragon in ISP mode [/etc/avrdude.conf:477]
dragon_jtag = Atmel AVR Dragon in JTAG mode [/etc/avrdude.conf:469]
jtag2dw = Atmel JTAG ICE mkII in debugWire mode [/etc/avrdude.conf:461]
jtag2isp = Atmel JTAG ICE mkII in ISP mode [/etc/avrdude.conf:453]
jtag2 = Atmel JTAG ICE mkII [/etc/avrdude.conf:445]
jtag2fast = Atmel JTAG ICE mkII [/etc/avrdude.conf:437]
jtag2slow = Atmel JTAG ICE mkII [/etc/avrdude.conf:429]
jtagmkII = Atmel JTAG ICE mkII [/etc/avrdude.conf:421]
jtag1slow = Atmel JTAG ICE (mkI) [/etc/avrdude.conf:414]
jtag1 = Atmel JTAG ICE (mkI) [/etc/avrdude.conf:406]
jtagmkI = Atmel JTAG ICE (mkI) [/etc/avrdude.conf:398]
avr911 = Atmel AppNote AVR911 AVROSP [/etc/avrdude.conf:392]
avr109 = Atmel AppNote AVR109 Boot Loader [/etc/avrdude.conf:386]
butterfly = Atmel Butterfly Development Board [/etc/avrdude.conf:380]
usbasp = USBasp, http://www.fischl.de/usbasp/ [/etc/avrdude.conf:374]
avr910 = Atmel Low Cost Serial Programmer [/etc/avrdude.conf:368]
stk500hvsp = Atmel STK500 V2 in high-voltage serial programming mode [/etc/avrdude.conf:362]
stk500pp = Atmel STK500 V2 in parallel programming mode [/etc/avrdude.conf:356]
stk500v2 = Atmel STK500 Version 2.x firmware [/etc/avrdude.conf:350]
stk500v1 = Atmel STK500 Version 1.x firmware [/etc/avrdude.conf:344]
stk500 = Atmel STK500 [/etc/avrdude.conf:338]
avrisp2 = Atmel AVR ISP mkII [/etc/avrdude.conf:328]
avrispmkII = Atmel AVR ISP mkII [/etc/avrdude.conf:322]
avrispv2 = Atmel AVR ISP V2 [/etc/avrdude.conf:316]
avrisp = Atmel AVR ISP [/etc/avrdude.conf:310]

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR -F
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo mcedit /etc/udev/rules.d/40-permissions.rules

$ sudo mcedit /etc/udev/rules.d/65-
65-dmsetup.rules 65-persistent-storage.rules
65-persistent-input.rules 65-programator.rules
$ sudo mcedit /etc/udev/rules.d/65-programator.rules

$ sudo cat /etc/udev/rules.d/65-programator.rules
KERNEL=="ttyACM0", NAME="AVR"


[ 4003.035799] usb 2-1: USB disconnect, address 5
[ 5253.262662] usb 2-1: new low speed USB device using ohci_hcd and address 6
[ 5253.500452] usb 2-1: configuration #1 chosen from 1 choice
[ 5253.504384] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[ 6125.721804] usb 2-1: USB disconnect, address 6
[ 6130.036372] usb 2-1: new low speed USB device using ohci_hcd and address 7
[ 6130.274132] usb 2-1: configuration #1 chosen from 1 choice
[ 6130.278060] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[ 6399.501693] usb 2-1: USB disconnect, address 7
[ 6404.684821] usb 2-1: new low speed USB device using ohci_hcd and address 8
[ 6404.922588] usb 2-1: configuration #1 chosen from 1 choice
[ 6404.926555] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F -t -u
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
avrdude> stk 4
>>> stk 4
avrdude: invalid command "stk"
avrdude> stv 4
>>> stv 4
avrdude: invalid command "stv"
avrdude> help
>>> help
Valid commands:

dump : dump memory : dump
read : alias for dump
write : write memory : write ...
erase : perform a chip erase
sig : display device signature bytes
part : display the current part information
send : send a raw command : send
parms : display adjustable parameters (STK500 only)
vtarg : set (STK500 only)
varef : set (STK500 only)
fosc : set (STK500 only)
sck : set (STK500 only)
help : help
? : help
quit : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude> read
>>> read
Usage: dump [ ]
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 2.2 us
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 2.2 us
avrdude> sck 1
>>> sck 1
avrdude: stk500v2_set_sck_period(): p = 1.0 us too small, using 1.1 us
avrdude> sck 2
>>> sck 2
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 2.2 us
avrdude> sck 3
>>> sck 3
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 3.3 us
avrdude> sck 4
>>> sck 4
avrdude> help
>>> help
Valid commands:

dump : dump memory : dump
read : alias for dump
write : write memory : write ...
erase : perform a chip erase
sig : display device signature bytes
part : display the current part information
send : send a raw command : send
parms : display adjustable parameters (STK500 only)
vtarg : set (STK500 only)
varef : set (STK500 only)
fosc : set (STK500 only)
sck : set (STK500 only)
help : help
? : help
quit : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude> quit
>>> quit

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F -t -u
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 4.4 us
avrdude> help
>>> help
Valid commands:

dump : dump memory : dump
read : alias for dump
write : write memory : write ...
erase : perform a chip erase
sig : display device signature bytes
part : display the current part information
send : send a raw command : send
parms : display adjustable parameters (STK500 only)
vtarg : set (STK500 only)
varef : set (STK500 only)
fosc : set (STK500 only)
sck : set (STK500 only)
help : help
? : help
quit : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude> fosc 12.0000
>>> fosc 12.0000
avrdude: stk500v2_set_fosc(): f = 12 Hz too low, 14 Hz min
avrdude (fosc): failed to set oscillator_frequency (rc = -1)
avrdude> fosc 12000000
>>> fosc 12000000
avrdude: stk500v2_set_fosc(): f = 12.000 MHz too high, using 3.686 MHz
avrdude> fosc 12000
>>> fosc 12000
avrdude> quit
>>> quit

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A

avrdude: safemode: Fuses OK

avrdude done. Thank you.

$ sudo avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F -t -u
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
avrdude>
avrdude> fosc 1.229 MHz
>>> fosc 1.229 MHz
Usage: fosc [M|k] | off
avrdude> fosc 1.229M
>>> fosc 1.229M
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.843 MHz
SCK period : 4.4 us
avrdude> fosc 12.00M
>>> fosc 12.00M
avrdude: stk500v2_set_fosc(): f = 12.000 MHz too high, using 3.686 MHz
avrdude> fosc 12M
>>> fosc 12M
avrdude: stk500v2_set_fosc(): f = 12.000 MHz too high, using 3.686 MHz
avrdude> fosc 1.229M
>>> fosc 1.229M
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.843 MHz
SCK period : 4.4 us
avrdude> help
>>> help
Valid commands:

dump : dump memory : dump
read : alias for dump
write : write memory : write ...
erase : perform a chip erase
sig : display device signature bytes
part : display the current part information
send : send a raw command : send
parms : display adjustable parameters (STK500 only)
vtarg : set (STK500 only)
varef : set (STK500 only)
fosc : set (STK500 only)
sck : set (STK500 only)
help : help
? : help
quit : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude> part
>>> part

AVR Part : ATtiny2313
Chip Erase delay : 9000 us
PAGEL : PD4
BS2 : PD6
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 6 4 0 no 128 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 2048 32 64 4500 4500 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00

avrdude> help
>>> help
Valid commands:

dump : dump memory : dump
read : alias for dump
write : write memory : write ...
erase : perform a chip erase
sig : display device signature bytes
part : display the current part information
send : send a raw command : send
parms : display adjustable parameters (STK500 only)
vtarg : set (STK500 only)
varef : set (STK500 only)
fosc : set (STK500 only)
sck : set (STK500 only)
help : help
? : help
quit : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude> sck
>>> sck
Usage: sck
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.843 MHz
SCK period : 4.4 us
avrdude> sck 1
>>> sck 1
avrdude: stk500v2_set_sck_period(): p = 1.0 us too small, using 1.1 us
avrdude> sck 1
>>> sck 1
avrdude: stk500v2_set_sck_period(): p = 1.0 us too small, using 1.1 us
avrdude> parms
>>> parms
Vtarget : 4.9 V
Varef : 0.0 V
Oscillator : 1.843 MHz
SCK period : 1.1 us
avrdude> sck 2
>>> sck 2
avrdude> parms
>>> parms
Vtarget : 5.0 V
Varef : 0.0 V
Oscillator : 1.843 MHz
SCK period : 2.2 us
avrdude>


$ whereis avrdude
avrdude: /usr/bin/avrdude /etc/avrdude.conf /usr/share/man/man1/avrdude.1.gz
$ touch /tmp/123.hex
$ chmod a+wrx /tmp/123.hex
$ less /tmp/123.hexqqqq
/tmp/123.hexqqqq: No such file or directory
$ less /tmp/123.hex
$ cat /tmp/123.hex
:2000000012C02AC029C028C027C026C025C024C023C022C021C020C01FC01EC01DC01CC0C1
:200020001BC01AC019C011241FBECFEDCDBF10E0A0E6B0E0ECE9F0E002C005900D92A03661
:20004000B107D9F710E0A0E6B0E001C01D92A036B107E1F710D021C0D3CF08958FEF87BB7C
:2000600081BB18BA12BA08958FEF88BB82BB089518BA12BA08958FEF87BB80BB849B04C055
:1C00800088B3847088BB01C0C29A859B04C088B3827088BBF3CFC19AF1CFFFCFD6
:00000001FF
$

user@desktop:~/Desktop/Dokumenty/AVR8_Burn-O-Mat$ avrdude -p t2313 -c stk500v2 -P /dev/AVR-Doper-USB-Programmer -F
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e910a

avrdude: safemode: Fuses OK

avrdude done. Thank you.

user@desktop:~/Desktop/Dokumenty/AVR8_Burn-O-Mat$ sh start.sh



ODCZYT FUSEBYTES


/usr/bin/avrdude -q -u -C /etc/avrdude.conf -p t2313 -P /dev/AVR-Doper-USB-Programmer -c stk500v2 -E noreset,novcc -F -U efuse:r:/tmp/efuse41068.hex:r -U hfuse:r:/tmp/hfuse41067.hex:r -U lfuse:r:/tmp/lfuse41066.hex:r
avrdude: WARNING: -E option not supported by this programmer type

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e910a
avrdude: reading efuse memory:
avrdude: writing output file "/tmp/efuse41068.hex"
avrdude: reading hfuse memory:
avrdude: writing output file "/tmp/hfuse41067.hex"
avrdude: reading lfuse memory:
avrdude: writing output file "/tmp/lfuse41066.hex"

avrdude done. Thank you.



ZAPIS FUSEBITES


/usr/bin/avrdude -q -u -C /etc/avrdude.conf -p t2313 -P /dev/AVR-Doper-USB-Programmer -c stk500v2 -E noreset,novcc -F -U efuse:w:0xFF:m -U hfuse:w:0xDF:m -U lfuse:w:0xFD:m
avrdude: WARNING: -E option not supported by this programmer type

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e910a
avrdude: reading input file "0xFF"
avrdude: writing efuse (1 bytes):
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFF:
avrdude: load data efuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip efuse data:
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFD"
avrdude: writing lfuse (1 bytes):
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFD:
avrdude: load data lfuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip lfuse data:
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done. Thank you.



ODCZYTANIE ZAWARTOSCI PROGRAMU Z MIKROKONTROLERA DO PLIKU


/usr/bin/avrdude -q -u -C /etc/avrdude.conf -p t2313 -P /dev/AVR-Doper-USB-Programmer -c stk500v2 -E noreset,novcc -F -U flash:r:/tmp/123.hex:i
avrdude: WARNING: -E option not supported by this programmer type
avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e910a
avrdude: reading flash memory:
avrdude: writing output file "/tmp/123.hex"

avrdude done. Thank you.



SKRYPT KONFUGURACJI FUSEBYTES


http://palmavr.sourceforge.net/cgi-bin/fc.cgi


Dodatkowe informacje n.T. fusebytes i programowania mikrokontrolerów AVR


http://www.tkdami.net/~voytek/programy/programy.html
http://www.elektroda.pl/rtvforum/topic854656.html


Oprogramownie do programowania mikrokontrolerów AVR


http://sourceforge.net/projects/kontrollerlab/

Atmel AVR toolchain

JTAG Tools

JTAG FAQ

AVR® 8-Bit RISC - Datasheets

Projekty elektroniczne open source na Linuxa z wykorzystaniem AVR

25 maja 2008

Symfony PHP framework - interesujące narzędzie

Niezrównany w bojach i podbojach szkieletów do kodowania w PHP zechciałem zmierzyć się z symfony PHP frameworks. Minęło już kilka lat jak tworzę własny miniFramework w PHP4 z moim autorskim miniORM. Jednym słowem wiele nocek spędzonych nad wywodami, jak przechowywać struktury bazodanowe w XML. Do tego XMLowe opakowania na formularze i walidacje. Ponadto używam między innymi takiego dodatku jako NuSOAP, który wprowadził do mojego kodu nie jeden sprawnie wykonany webserwis.



Kleje sobie własny frameworki i kleje ... a tu nagle widzę po ruchu społeczności symfony, że wzorując się na Ruby On Rails tworzą całkiem sprawny kawałek kodu, co najważniejsze ze wsparciem społeczności w promowaniu dodatków tzw. symfony plugins.


Pierwsze kroki zupełnie mnie osłupiły, bo generatory jakich się nie spodziewałem biorą górę, przynajmniej można tak jak w moim skromnym projekcie miniframework wygenerować szablonowo formularze backendowe, powiązane z generowanymi modelami w PHP oraz relacjami w danych. Nieco się tego napisałem i stwierdzam, że pokrycie testami jednostkowymi w symfony nie powala, ale ważne, że temat został opakowany w obiektowe podejście do kodowania w PHP. Cóż, czas zamrozić wersję mojego miniFramework'a i przyłączyć się do społeczności symfony.



Z początku próbowałem sam odkrywać co w plikach piszczy, ale oczywiście dokumentacja z krokami, która została opublikowana rozjaśnia wszystkie zasadnicze elementy pracy z tym narzędziem. Po kilku godzinach prób i testów, stwierdzam, że jest to kierunek w PHP, w jakim warto kontynuować rozwój ... z jakim skutkiem zobaczymy ;-)

Pozytywy wykorzystywania frameworka symfony, o których warto wspomnieć to:



  • konsekwencja nazewnictwa i budowy drzewa projektu

  • konsekwencja w utrzymaniu konfiguracji projektu

  • prostota pisania bibliotek, komponentów, pluginów a nawet partiali i slotów wymienialnych pomiędzy projektami

  • wbufdowany trub debugowania i logowanie zdarzeń o ustawialnym poziomie (filtrowaniu)

  • prostota budowania aplikacji z kategorii Web 2.0 z silnym nastawieniem na AJAX

  • społeczność oraz forumy i grupy dyskusyjne na tematy błędów występujących w CORE i pluginach





Od dziś polecam każdemu programiście PHP poznanie symfony - po co utrudniać sobie życie, przecież PHP jest i tak zakręcony ;-)

Lektura branżowa: Moja Praca Emigruje do Indii

Każdego ranka budzimy się po "lekturze snów" lub na lekturze interesującej książki, którą czytaliśmy wczoraj wieczorem :) Już dawno nie czytałem dzieła branżowego, które nie pozwoliłoby mi zasnąć na nim :) Zakup nastąpił natychmiast, kiedy w poszukiwaniu książek n. t. GWT natknąłem się na książkę p.t. Moja Praca Emigruje do Indii autorstwa Chad Fowler (z lubelskiego wydawnictwa powernet). Sprawna transakcja, bezproblemowa wysyłka - gratis. Dosłownie chwilę po tym, jak ją otrzymałem zasięgnąłem kilku mądrych rad n.t. "52 sposobów na zdobycie i zachowanie pracy". Jestem w trakcie lektury i zarazem pod wrażeniem przekazu ... niebawem spróbuję dodać kilka wypowiedzi po jej przeczytaniu.

Oto wygląd okładki dla ciekawskich:

22 maja 2008

Dual desktop + Ubuntu + praca na dwóch monitorach

Po kilku dniach walki z dodatkiem xorg.conf oraz dodatkiem xinerama nie poddaję się :-)
Przeglądam i rozpoznaję nadal ważne wątki:
http://www.systhread.net/texts/200506extendedX.php
http://lists.freedesktop.org/archives/xorg/2004-February/000015.html
http://digital-domain.net/lug/multi-monitor/
http://ubuntuforums.org/showthread.php?t=238518
http://digital-domain.net/lug/multi-monitor/xorg.conf
http://gentoo-wiki.com/HOWTO_Dual_Monitors
http://lists.freebsd.org/pipermail/freebsd-questions/2005-May/087929.html
http://p4a.dk/conf/xorg.conf
ftp://download.nvidia.com/XFree86/Linux-x86/1.0-8178/README/appendix-g.html
http://mkaz.com/ref/gentoo_dual.html
http://wiki.osuosl.org/display/howto/Set+Up+Dual+Monitors+-+xorg.conf


Pomyślałem sobie, że jednak wciąż nie dorównuje toto sterownikom w konkurencyjnych OSach ... i już zamierzałem wyłączyć kompa ... kiedy ujrzałem magiczne
xrandr / grandr
http://packages.ubuntu.com/gutsy/xrandr
http://www.newlinuxuser.com/a-better-xrandr-tool-for-the-next-ubuntu-release/
http://ubuntuforums.org/tags.php?tag=xrandr
http://douglasfils.blogspot.com/2008/04/xrandr-with-ubuntu-804-and-external.html


Zachciało mi się pracy na kilku monitorach i udało się coś wycedzić:
Wystarczyło do xorg.conf dopisać:
Virtual 3000 2000
w poniższej sekcji:
Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Monitor "PLE1900WS"
DefaultDepth 24
SubSection "Display"
Modes "1440x900" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1024x768" "800x600" "640x480"
Virtual 3000 2000
EndSubSection
EndSection

Następnie z konsoli na zwykłym koncie:
xrandr -q
Efekt działania:
Screen 0: minimum 320 x 200, current 2720 x 900, maximum 3000 x 2000
VGA connected 1440x900+1280+0 (normal left inverted right) 410mm x 257mm
1440x900 59.9*+ 75.0 59.9
1280x1024 75.0 59.9
1280x960 59.9
1152x864 75.0 74.8
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
LVDS connected 1280x800+0+0 (normal left inverted right) 0mm x 0mm
1280x800 60.0*+ 60.0
1280x768 60.0
1152x768 54.8
1024x768 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1
TV disconnected (normal left inverted right)

Generowanie optymalnego trybu
modline dla monitora:
$ gtf 1440 900 60 -v
1: [H PIXELS RND] : 1440.000000
2: [V LINES RND] : 900.000000
3: [V FIELD RATE RQD] : 60.000000
4: [TOP MARGIN (LINES)] : 0.000000
5: [BOT MARGIN (LINES)] : 0.000000
6: [INTERLACE] : 0.000000
7: [H PERIOD EST] : 17.887533
8: [V SYNC+BP] : 31.000000
9: [V BACK PORCH] : 28.000000
10: [TOTAL V LINES] : 932.000000
11: [V FIELD RATE EST] : 59.983753
12: [H PERIOD] : 17.882690
13: [V FIELD RATE] : 59.999996
14: [V FRAME RATE] : 59.999996
15: [LEFT MARGIN (PIXELS)] : 0.000000
16: [RIGHT MARGIN (PIXELS)] : 0.000000
17: [TOTAL ACTIVE PIXELS] : 1440.000000
18: [IDEAL DUTY CYCLE] : 24.635193
19: [H BLANK (PIXELS)] : 464.000000
20: [TOTAL PIXELS] : 1904.000000
21: [PIXEL FREQ] : 106.471672
22: [H FREQ] : 55.919998
17: [H SYNC (PIXELS)] : 152.000000
18: [H FRONT PORCH (PIXELS)] : 80.000000
36: [V ODD FRONT PORCH(LINES)] : 1.000000


# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
Modeline "1440x900_60.00" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync


Po czym wydałem kilka nieskomplikowanych poleceń i mogę pracowac na dwa monitorki ;)

Ustawianie dwóch monitorów jedną linijką:

$ xrandr --output LVDS --mode 1280x800 --output VGA --mode 1440x900_60 --right-of LVDS

Dla lubiących klikać jest też grandr, który w moich testach nie wypadł zbyt wspaniale ... cóż kiedyś polubiłem terminale ;)

Oto moja konfiguracja xorg.conf dla Ubuntu 7.10, dla sprzętu:
laptop: TOSHIBA A-120
monitor: ProLite E1900WS

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
EndSection

Section "Monitor"
Identifier "PLE1900WS"
Option "DPMS"
HorizSync 30-83
### test
# HorizSync 30-85
VertRefresh 50-85

# 1440x960 @ 60.00 Hz (GTF) hsync: 59.64 kHz; pclk: 114.51 MHz
Modeline "1440x960_60" 114.51 1440 1528 1680 1920 960 961 964 994 -HSync +Vsync

# 1440x960 @ 85.00 Hz (GTF) hsync: 85.68 kHz; pclk: 167.25 MHz
Modeline "1440x960_85" 167.25 1440 1536 1696 1952 960 961 964 1008 -HSync +Vsync

# 1440x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 122.11 MHz
Modeline "1440x1024_60" 122.11 1440 1528 1680 1920 1024 1025 1028 1060 -HSync +Vsync

# 1440x1024 @ 85.00 Hz (GTF) hsync: 91.38 kHz; pclk: 179.83 MHz
Modeline "1440x1024_85" 179.83 1440 1544 1704 1968 1024 1025 1028 1075 -HSync +Vsync

# 1440x900 @ 85.00 Hz (GTF) hsync: 80.33 kHz; pclk: 156.79 MHz
Modeline "1440x900_85" 156.79 1440 1536 1696 1952 900 901 904 945 -HSync +Vsync

# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
Modeline "1440x900_60" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Monitor "PLE1900WS"
DefaultDepth 24
SubSection "Display"
Modes "1440x900" "1440x1024" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1024x768" "800x600" "640x480"
Virtual 3000 2000
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection


Dla chcących przetestować powyższą konfigurację z Compizem polecam nastepujący wpis