Conrad Probot: Unterschied zwischen den Versionen

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche
(Named Pin Konfiguration)
Zeile 28: Zeile 28:
 
  # PIN | IN/OUT | When active? | Name
 
  # PIN | IN/OUT | When active? | Name
 
  #-----+--------+--------------+----------------
 
  #-----+--------+--------------+----------------
  PB0     OUTPUT  HIGH          encoder_ir
+
  PB0 OUTPUT  LOW        encoder_ir     # led for encoder_right AND encoder_left
  PB4     OUTPUT  HIGH           beep
+
  PB4 OUTPUT  HIGH       beep
  PB5     OUTPUT  HIGH           motor_right
+
  PB5 OUTPUT  HIGH       motor_right
  PB6     OUTPUT  HIGH           motor_left
+
  PB6 OUTPUT  HIGH       motor_left
  PB7     OUTPUT  HIGH           motor_enable
+
  PB7 OUTPUT  HIGH       motor_enable
  PC0     OUTPUT  HIGH          led_front_left
+
  PC0 OUTPUT  LOW        led_back_right
  PC1     OUTPUT  HIGH          led_front_right
+
  PC1 OUTPUT  LOW        led_back_left
  PC2     OUTPUT  HIGH          led_back_left
+
  PC2 OUTPUT  LOW        led_front_right
  PC3     OUTPUT  HIGH          led_back_right
+
  PC3 OUTPUT  LOW        led_front_left
  PC4     OUTPUT  HIGH          led_line_sensor
+
  PC4 OUTPUT  LOW        led_line_sensor
  PD2     OUTPUT  HIGH           tsop
+
  PD2 INPUT    HIGH       tsop
  PD3     OUTPUT  HIGH          ir_left
+
  PD3 OUTPUT  LOW        ir_left         # together with pwm_ir
  PD4     OUTPUT  HIGH          ir_right
+
  PD4 OUTPUT  LOW        ir_right       # together with pwm_ir
  PE3    OUTPUT  HIGH          pwm_ir
+
  PE3    OUTPUT  HIGH          pwm_ir         # pwm for ir_left AND ir_right
  PE4     INPUT    HIGH           boot
+
  PE4 INPUT    HIGH       boot #test invert action
  PE6     OUTPUT  HIGH          encoder_right
+
  PE6 INPUT    LOW        encoder_right       # ?
  PE7     OUTPUT  HIGH          encoder_left
+
  PE7 INPUT    LOW        encoder_left       # ?
  PF5     OUTPUT  HIGH          ldr_right
+
  PF5 INPUT    LOW        ldr_right       # active?
  PF4     OUTPUT  HIGH          ldr_left
+
  PF4 INPUT    LOW        ldr_left       # active?
  PF3     OUTPUT  HIGH           mic
+
  PF3 INPUT    HIGH       mic
  PF2     OUTPUT  HIGH           line_sensor_right
+
  PF2 INPUT    HIGH       line_sensor_right
  PF1     OUTPUT  HIGH           line_sensor_left
+
  PF1 INPUT    HIGH       line_sensor_left
  PF0     OUTPUT  HIGH           ub_measurement
+
  PF0 INPUT    HIGH       ub_measurement
 
 
  
 
== Control6 Scripte ==
 
== Control6 Scripte ==

Version vom 21. Oktober 2009, 20:29 Uhr

Der Support für den Probot von Conrad ist noch experimentell!

Conrad-probot.jpg

make menuconfig

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)