push/pull output is selected / the pin status is low level XE164 XE166 XE16x

Gast #2224774
Lesenswert?

XE164 XE166 XE16x


-Was bedeutet the pin status is low level?

Ist der pin zu anfang ausgeschalltet = 0Volt.



-Was bedeutet push/pull output is selected?



P0_IOCRXX, XX=00,01,02    =  0x0080;   // 0000.0000.1000.0000

// load port control register 0
// P0.0 is used as general purpose output
//  - push/pull output is selected
//  - the pin status is low level


_____________________________________________


7.2.5 Port Input/Output Control Registers

http://www.infineon.com/dgdl/xe166_um_v2.1_2008_08_vol1sys.pdf?folderId=db3a3043156fd5730115b3a665650d23&fileId=db3a3043156fd5730116100b5a941b4f
Gast #2224842
Lesenswert?

Hallo hans,

etwas verständlicher könntest du dich schon ausdrücken. Ich versuche 
trotzdem mal etwas Hilfestellung zu geben.

Mit den Px_IOCRxx Registern werden den Pins ihre jeweiligen Aufgaben zu 
geordnet.
Du hast das Beispiel
> P0_IOCRXX, XX=00,01,02    =  0x0080;   // 0000.0000.1000.0000
angeführt.
Damit wird der Pin XX am Port 0 als General purpose Output mit (Direct
input) Pushpull konfiguriert. Die Alternative ware Open Drain.

Da du fragst scheinst du mit den Begriffen nichts anfangen zu können.
PushPull bedeutet der Pegel am Pin wird bei einer logischen Eins im 
Output-Register 5V einnehmen. Bei einer logischen Null wird er 0V 
einnehmen. Bei OpenDrain wäre der Pegel bei logischer Null nicht 
festgelegt, man könnte also zum Beispiel eine Veroderung aufbauen.

In dem Register werden übrigens auch die anderen Funktionen wie CAN, 
USART, PWM und so weiter auf die jeweiligen Pins aufgeschalten. Bzw bei 
Eingängen kann man PullUps und PullDowns aktivieren.

Gruß,
TManiac
Gast #2224878
Lesenswert?

Danke für die schnelle Antwort!
Ja ich habe es einmal ausführlich geschreiben und habe ein link 
geklickt! leider speicher diese Forum das geschrieben nicht und somit 
war alles weg, inklusieve meiner Gedult.


"the pin status is low level"

Weist dieser Kommentar darauf hin, dass der Pin zu anfang 0Volt 
aussendet?
Gast #2224905
Lesenswert?

Hi hans,

was heißt "zu Anfang"?

Ganz am Anfang wenn der Controller aufstartet, ist der Pin als Eingang 
konfiguriert. Er wird erst ein Ausgang wenn du das in das Px_IOCRxx 
Register hinein schreibst. Nun kommt es aber darauf an, was zu diesem 
Zeitpunkt im Px_OUT Register steht. Der Pin wird nun genau diesen Wert 
annehmen. Wenn also im P0_OUT Register noch der Initialwert von 0x0000 
drin steht, dann wird der Pin auch auf LowLevel gehen.

Frage am Rande: Wo hast du den Beispiel-Code her?


Gruß,
TManiac
Gast #2224932
Lesenswert?

Ich weiß es sind einige Kommentare und wenig Code?
Ich zetze mich grundsätzlich mit der Initialiesierung gerade 
auseinander.

FOC Motor Drive Application Kit
Scalable Solution for Field Oriented Control (FOC)

Warum brauchst du diese Information?

IO.C
1
void IO_vInit(void)
2
{
3
  // USER CODE BEGIN (IO_Function,2)
4

5
  // USER CODE END
6

7

8
  ///  -----------------------------------------------------------------------
9
  ///  Configuration of Port P0:
10
  ///  -----------------------------------------------------------------------
11
  ///  P0.0 is used as general purpose output
12
  ///  - push/pull output is selected
13
  ///  - the pin status is low level
14
  ///  P0.1 is used as general purpose output
15
  ///  - push/pull output is selected
16
  ///  - the pin status is low level
17
  ///  P0.2 is used as general purpose output
18
  ///  - push/pull output is selected
19
  ///  - the pin status is low level
20

21
  ///  P0.0 - P0.3 output driver characteristic: strong driver
22
  ///  P0.4 - P0.7 output driver characteristic: strong driver
23

24
  ///  P0.0 - P0.3 output edge characteristic: sharp edge mode
25
  ///  P0.4 - P0.7 output edge characteristic: sharp edge mode
26

27
  P0_IOCR00      =  0x0080;      // load port control register 0
28
  P0_IOCR01      =  0x0080;      // load port control register 1
29
  P0_IOCR02      =  0x0080;      // load port control register 2
30

31
  ///  -----------------------------------------------------------------------
32
  ///  Configuration of Port P1:
33
  ///  -----------------------------------------------------------------------
34
  ///  - no pin of port P1 is used
35

36

37
  ///  -----------------------------------------------------------------------
38
  ///  Configuration of Port P2:
39
  ///  -----------------------------------------------------------------------
40
  ///  P2.5 is used as alternate output for the CAN0 Transmit output(TXDC0E)
41
  ///  - push/pull output is selected
42
  ///  P2.6 is used as alternate input for the CAN0 Receive input(RXDC0D)
43

44
  ///  P2.0 - P2.3 output driver characteristic: strong driver
45
  ///  P2.4 - P2.7 output driver characteristic: strong driver
46
  ///  P2.8 - P2.12 output driver characteristic: strong driver
47

48
  ///  P2.0 - P2.3 output edge characteristic: sharp edge mode
49
  ///  P2.4 - P2.7 output edge characteristic: sharp edge mode
50
  ///  P2.8 - P2.12 output edge characteristic: sharp edge mode
51

52

53
  ///  -----------------------------------------------------------------------
54
  ///  Configuration of Port P4:
55
  ///  -----------------------------------------------------------------------
56
  ///  - no pin of port P4 is used
57

58

59
  ///  -----------------------------------------------------------------------
60
  ///  Configuration of Port P5:
61
  ///  -----------------------------------------------------------------------
62
  ///  P5.8 is used as alternate input for the  Analog Input Pin (AN58)
63
  ///  P5.13 is used as alternate input for the  Analog Input Pin (AN513)
64
  ///  P5.15 is used as alternate input for the  Analog Input Pin (AN515)
65

66

67
  ///  -----------------------------------------------------------------------
68
  ///  Configuration of Port P6:
69
  ///  -----------------------------------------------------------------------
70
  ///  - no pin of port P6 is used
71

72

73
  ///  -----------------------------------------------------------------------
74
  ///  Configuration of Port P7:
75
  ///  -----------------------------------------------------------------------
76
  ///  - no pin of port P7 is used
77

78

79
  ///  -----------------------------------------------------------------------
80
  ///  Configuration of Port P10:
81
  ///  -----------------------------------------------------------------------
82
  ///  P10.0 is used as alternate output for the CCU60 output(CC60)
83
  ///  - push/pull output is selected
84
  ///  P10.1 is used as alternate output for the CCU60 output(CC61)
85
  ///  - push/pull output is selected
86
  ///  P10.2 is used as alternate output for the  CCU60 output(CC62)
87
  ///  - push/pull output is selected
88
  ///  P10.3 is used as alternate output for the  CCU60 output(COUT60)
89
  ///  - push/pull output is selected
90
  ///  P10.4 is used as alternate output for the CCU60 output(COUT61)
91
  ///  - push/pull output is selected
92
  ///  P10.5 is used as alternate output for the CCU60 output(COUT62)
93
  ///  - push/pull output is selected
94
  ///  P10.6 is used as alternate input for the  CCU60 input(CTRAPA)
95

96
  ///  P10.0 - P10.3 output driver characteristic: strong driver
97
  ///  P10.4 - P10.7 output driver characteristic: strong driver
98
  ///  P10.8 - P10.11 output driver characteristic: strong driver
99
  ///  P10.12 - P10.15 output driver characteristic: strong driver
100

101
  ///  P10.0 - P10.3 output edge characteristic: sharp edge mode
102
  ///  P10.4 - P10.7 output edge characteristic: sharp edge mode
103
  ///  P10.8 - P10.11 output edge characteristic: sharp edge mode
104
  ///  P10.12 - P10.15 output edge characteristic: sharp edge mode
105

106

107
  ///  -----------------------------------------------------------------------
108
  ///  Configuration of Port P15:
109
  ///  -----------------------------------------------------------------------
110
  ///  - no pin of port P15 is used
111
  ///  - Port15 Data register P15(Read only)
112

113

114

115
  // USER CODE BEGIN (IO_Function,3)
116

117
  // USER CODE END
118

119
} 
120

121
//  End of function IO_vInit
122

123

124

125

126
// USER CODE BEGIN (IO_General,10)
127

128

129
// USER CODE END
Gast #2224949
Lesenswert?

Ich hatte nicht geschrieben, das ich die Info brauche, es war aus reinem 
Interesse, falls da noch was in der Nähe steht.

Aber wie vermutet ist das DAvE-Generierter Code. Und das P0_OUT Register 
wurde eben noch nicht vorher beschrieben und hat somit noch den Wert 
0x0000, damit wird der Pin auch den LowLevel annehmen wenn er als 
Ausgang geschalten wird.

Gruß,
TManiac

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren