Conrad Probot
Version vom 21. Oktober 2009, 20:36 Uhr von Habo (Diskussion | Beiträge) (→Named Pin Konfiguration)
Der Support für den Probot von Conrad ist noch experimentell!
Inhaltsverzeichnis
In menuconfig sollte man folgendes einstellen:
- Target MCU: atmega128
- MCU Frequency: 14745000
- Hardware/Periphery Class: (Conrad:Probot
- Named and logic state I/O
- I2C Master Support (mit I2C Detection Support und I2C EEPROM (24cxx) Support)
Named Pin Konfiguration
Hier die passende core/portio/config für Named_PIN
- Named Pin muss aktiviert sein!
# # Named Pin Configuration File # # You can assign names to your microcontroller's pins here. # Keep in mind that this names must consist of alphanumeric # characters only! # # Every line starting with a hash sign (#) is a comment. # # # PIN | IN/OUT | When active? | Name #-----+--------+--------------+---------------- PB0 OUTPUT LOW encoder_ir # led for encoder_right AND encoder_left PB4 OUTPUT HIGH beep PB5 OUTPUT HIGH motor_right PB6 OUTPUT HIGH motor_left PB7 OUTPUT HIGH motor_enable PC0 OUTPUT LOW led_back_right PC1 OUTPUT LOW led_back_left PC2 OUTPUT LOW led_front_right PC3 OUTPUT LOW led_front_left PC4 OUTPUT LOW led_line_sensor PD2 INPUT HIGH tsop PD3 OUTPUT LOW ir_left # together with pwm_ir PD4 OUTPUT LOW ir_right # together with pwm_ir PE3 OUTPUT HIGH pwm_ir # pwm for ir_left AND ir_right PE4 INPUT HIGH boot #test invert action PE6 INPUT LOW encoder_right # ? PE7 INPUT LOW encoder_left # ? PF5 INPUT LOW ldr_right # active? PF4 INPUT LOW ldr_left # active? PF3 INPUT HIGH mic PF2 INPUT HIGH line_sensor_right PF1 INPUT HIGH line_sensor_left PF0 INPUT HIGH ub_measurement
Control6 Scripte
Einen Einstieg in Control6 gibt es auch auf der Seite für PIN_Commands
Beispiel für ein Control6 mit Named Pin
- Script unter control6/control6.src
- control6 muss aktiviert sein!
- Named_Pin muss aktiviert sein!
Die 4 LEDs der Hauptplatine blinken alle der Reihe nach
THREAD(blinkrun) PIN_SET(led_front_left); PIN_CLEAR(led_back_left); WAIT(1); PIN_SET(led_back_left); PIN_CLEAR(led_back_right); WAIT(1); PIN_SET(led_back_right); PIN_CLEAR(led_front_right); WAIT(1); PIN_SET(led_front_right); PIN_CLEAR(led_front_left); WAIT(1); THREAD_END(blinkrun) THREAD_START(blinkrun)