1 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
2 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
} |
|
Show voter details
|
3 |
DENIED
|
edit
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
} |
|
Show voter details
|
4 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
} |
|
Show voter details
|
5 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
6 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4055
+user: App\Entity\User {#4003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "What does shiftDataOut do? You loop over it but you give the whole byte to it anyway in each loop."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695880391 {#4064
date: 2023-09-28 07:53:11.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4053 …}
+nested: Doctrine\ORM\PersistentCollection {#4051 …}
+votes: Doctrine\ORM\PersistentCollection {#4049 …}
+reports: Doctrine\ORM\PersistentCollection {#4047 …}
+favourites: Doctrine\ORM\PersistentCollection {#4015 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 29964
-bodyTs: "'anyway':17 'byte':14 'give':11 'loop':6,20 'shiftdataout':3 'whole':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/3282908"
+editedAt: null
+createdAt: DateTimeImmutable @1695880391 {#4000
date: 2023-09-28 07:53:11.0 +02:00
}
} |
|
Show voter details
|
7 |
DENIED
|
edit
|
App\Entity\EntryComment {#4055
+user: App\Entity\User {#4003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "What does shiftDataOut do? You loop over it but you give the whole byte to it anyway in each loop."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695880391 {#4064
date: 2023-09-28 07:53:11.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4053 …}
+nested: Doctrine\ORM\PersistentCollection {#4051 …}
+votes: Doctrine\ORM\PersistentCollection {#4049 …}
+reports: Doctrine\ORM\PersistentCollection {#4047 …}
+favourites: Doctrine\ORM\PersistentCollection {#4015 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 29964
-bodyTs: "'anyway':17 'byte':14 'give':11 'loop':6,20 'shiftdataout':3 'whole':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/3282908"
+editedAt: null
+createdAt: DateTimeImmutable @1695880391 {#4000
date: 2023-09-28 07:53:11.0 +02:00
}
} |
|
Show voter details
|
8 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4055
+user: App\Entity\User {#4003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "What does shiftDataOut do? You loop over it but you give the whole byte to it anyway in each loop."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695880391 {#4064
date: 2023-09-28 07:53:11.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4053 …}
+nested: Doctrine\ORM\PersistentCollection {#4051 …}
+votes: Doctrine\ORM\PersistentCollection {#4049 …}
+reports: Doctrine\ORM\PersistentCollection {#4047 …}
+favourites: Doctrine\ORM\PersistentCollection {#4015 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 29964
-bodyTs: "'anyway':17 'byte':14 'give':11 'loop':6,20 'shiftdataout':3 'whole':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/3282908"
+editedAt: null
+createdAt: DateTimeImmutable @1695880391 {#4000
date: 2023-09-28 07:53:11.0 +02:00
}
} |
|
Show voter details
|
9 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
10 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4087
+user: App\Entity\User {#4076 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would it work if you made that delay 1000?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695882010 {#4093
date: 2023-09-28 08:20:10.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4092 …}
+nested: Doctrine\ORM\PersistentCollection {#4091 …}
+votes: Doctrine\ORM\PersistentCollection {#4082 …}
+reports: Doctrine\ORM\PersistentCollection {#4085 …}
+favourites: Doctrine\ORM\PersistentCollection {#4080 …}
+notifications: Doctrine\ORM\PersistentCollection {#4078 …}
-id: 29957
-bodyTs: "'1000':9 'delay':8 'made':6 'work':3 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/3857487"
+editedAt: null
+createdAt: DateTimeImmutable @1695868540 {#4098
date: 2023-09-28 04:35:40.0 +02:00
}
} |
|
Show voter details
|
11 |
DENIED
|
edit
|
App\Entity\EntryComment {#4087
+user: App\Entity\User {#4076 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would it work if you made that delay 1000?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695882010 {#4093
date: 2023-09-28 08:20:10.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4092 …}
+nested: Doctrine\ORM\PersistentCollection {#4091 …}
+votes: Doctrine\ORM\PersistentCollection {#4082 …}
+reports: Doctrine\ORM\PersistentCollection {#4085 …}
+favourites: Doctrine\ORM\PersistentCollection {#4080 …}
+notifications: Doctrine\ORM\PersistentCollection {#4078 …}
-id: 29957
-bodyTs: "'1000':9 'delay':8 'made':6 'work':3 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/3857487"
+editedAt: null
+createdAt: DateTimeImmutable @1695868540 {#4098
date: 2023-09-28 04:35:40.0 +02:00
}
} |
|
Show voter details
|
12 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4087
+user: App\Entity\User {#4076 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would it work if you made that delay 1000?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1695882010 {#4093
date: 2023-09-28 08:20:10.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4092 …}
+nested: Doctrine\ORM\PersistentCollection {#4091 …}
+votes: Doctrine\ORM\PersistentCollection {#4082 …}
+reports: Doctrine\ORM\PersistentCollection {#4085 …}
+favourites: Doctrine\ORM\PersistentCollection {#4080 …}
+notifications: Doctrine\ORM\PersistentCollection {#4078 …}
-id: 29957
-bodyTs: "'1000':9 'delay':8 'made':6 'work':3 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/3857487"
+editedAt: null
+createdAt: DateTimeImmutable @1695868540 {#4098
date: 2023-09-28 04:35:40.0 +02:00
}
} |
|
Show voter details
|
13 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
14 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4173
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
The first two lines of the for loop,\n
\n
```\n
\n
<span style="color:#323232;">byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;">byte lower_byte = input_bin & 0x00FF;\n
</span>\n
```\n
\n
don’t really accomplish anything. The first line is bit shifting to the right 8, and then you just bitwise and it resulting in the same thing. For example, starting with `input_bin`:\n
\n
```\n
\n
<span style="color:#323232;">1000 0000 0000 0000\n
</span><span style="color:#323232;">>> 8\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span><span style="color:#323232;">& 0xFF\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span>\n
```\n
\n
So, every time you go through a cycle of the for loop, you’ll just start with the same values in `upper_byte`, and `lower_byte`. To sequentially output each shifted value, you’ll instead want something like:\n
\n
```\n
\n
<span style="color:#323232;">output_value = 0b1\n
</span><span style="color:#323232;">for i = 1 to 16:\n
</span><span style="color:#323232;"> latch(low)\n
</span><span style="color:#323232;"> shift_out(output_value)\n
</span><span style="color:#323232;"> latch(high)\n
</span><span style="color:#323232;"> output_value = output_value << 1\n
</span>\n
```\n
\n
That is, if I interpereted correctly that you want the shift registers to output the following:\n
\n
```\n
\n
<span style="color:#323232;">output_count, upper_shift_register, lower_shift_register\n
</span><span style="color:#323232;">1, 00000000, 00000001\n
</span><span style="color:#323232;">2, 00000000, 00000010\n
</span><span style="color:#323232;">3, 00000000, 00000100\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">16, 10000000, 00000000\n
</span>\n
```\n
\n
Note: Lemmy has a bug where it doesn’t format some symbols correctly, so the left angle bracket gets formatted as `<`. The same issue exists for the right angle bracket, the ampersand, and I would presume others.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695882894 {#4167
date: 2023-09-28 08:34:54.0 +02:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4174 …}
+nested: Doctrine\ORM\PersistentCollection {#4176 …}
+votes: Doctrine\ORM\PersistentCollection {#4178 …}
+reports: Doctrine\ORM\PersistentCollection {#4180 …}
+favourites: Doctrine\ORM\PersistentCollection {#4182 …}
+notifications: Doctrine\ORM\PersistentCollection {#4184 …}
-id: 29950
-bodyTs: "'0000':55,56,57,59,60,62,64,65,67 '00000000':152,155,158,162 '00000001':153 '00000010':156 '00000100':159 '0b1':108 '0x00ff':20 '0xff':63 '1':111,126,151 '1000':54,61,66 '10000000':161 '16':113,160 '2':154 '3':157 '8':14,35,58 'accomplish':24 'ampersand':194 'angl':179,191 'anyth':25 'bin':13,19,53 'bit':30 'bitwis':40 'bracket':180,192 'bug':167 'byte':9,11,15,17,90,93 'correct':132,175 'count':144 'cycl':75 'doesn':170 'everi':69 'exampl':49 'exist':187 'first':2,27 'follow':142 'format':172,182 'get':181 'go':72 'high':121 'input':12,18,52 'instead':102 'interperet':131 'issu':186 'latch':114,120 'left':178 'lemmi':164 'like':105 'line':4,28 'll':81,101 'loop':8,79 'low':115 'lower':16,92,148 'note':163 'other':199 'output':96,106,118,122,124,140,143 'presum':198 'realli':23 'regist':138,147,150 'result':43 'right':34,190 'sequenti':95 'shift':31,98,116,137,146,149 'someth':104 'start':50,83 'symbol':174 'thing':47 'time':70 'two':3 'upper':10,89,145 'valu':87,99,107,119,123,125 'want':103,135 'would':197"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4055088"
+editedAt: DateTimeImmutable @1695883315 {#4168
date: 2023-09-28 08:41:55.0 +02:00
}
+createdAt: DateTimeImmutable @1695856746 {#4169
date: 2023-09-28 01:19:06.0 +02:00
}
} |
|
Show voter details
|
15 |
DENIED
|
edit
|
App\Entity\EntryComment {#4173
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
The first two lines of the for loop,\n
\n
```\n
\n
<span style="color:#323232;">byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;">byte lower_byte = input_bin & 0x00FF;\n
</span>\n
```\n
\n
don’t really accomplish anything. The first line is bit shifting to the right 8, and then you just bitwise and it resulting in the same thing. For example, starting with `input_bin`:\n
\n
```\n
\n
<span style="color:#323232;">1000 0000 0000 0000\n
</span><span style="color:#323232;">>> 8\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span><span style="color:#323232;">& 0xFF\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span>\n
```\n
\n
So, every time you go through a cycle of the for loop, you’ll just start with the same values in `upper_byte`, and `lower_byte`. To sequentially output each shifted value, you’ll instead want something like:\n
\n
```\n
\n
<span style="color:#323232;">output_value = 0b1\n
</span><span style="color:#323232;">for i = 1 to 16:\n
</span><span style="color:#323232;"> latch(low)\n
</span><span style="color:#323232;"> shift_out(output_value)\n
</span><span style="color:#323232;"> latch(high)\n
</span><span style="color:#323232;"> output_value = output_value << 1\n
</span>\n
```\n
\n
That is, if I interpereted correctly that you want the shift registers to output the following:\n
\n
```\n
\n
<span style="color:#323232;">output_count, upper_shift_register, lower_shift_register\n
</span><span style="color:#323232;">1, 00000000, 00000001\n
</span><span style="color:#323232;">2, 00000000, 00000010\n
</span><span style="color:#323232;">3, 00000000, 00000100\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">16, 10000000, 00000000\n
</span>\n
```\n
\n
Note: Lemmy has a bug where it doesn’t format some symbols correctly, so the left angle bracket gets formatted as `<`. The same issue exists for the right angle bracket, the ampersand, and I would presume others.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695882894 {#4167
date: 2023-09-28 08:34:54.0 +02:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4174 …}
+nested: Doctrine\ORM\PersistentCollection {#4176 …}
+votes: Doctrine\ORM\PersistentCollection {#4178 …}
+reports: Doctrine\ORM\PersistentCollection {#4180 …}
+favourites: Doctrine\ORM\PersistentCollection {#4182 …}
+notifications: Doctrine\ORM\PersistentCollection {#4184 …}
-id: 29950
-bodyTs: "'0000':55,56,57,59,60,62,64,65,67 '00000000':152,155,158,162 '00000001':153 '00000010':156 '00000100':159 '0b1':108 '0x00ff':20 '0xff':63 '1':111,126,151 '1000':54,61,66 '10000000':161 '16':113,160 '2':154 '3':157 '8':14,35,58 'accomplish':24 'ampersand':194 'angl':179,191 'anyth':25 'bin':13,19,53 'bit':30 'bitwis':40 'bracket':180,192 'bug':167 'byte':9,11,15,17,90,93 'correct':132,175 'count':144 'cycl':75 'doesn':170 'everi':69 'exampl':49 'exist':187 'first':2,27 'follow':142 'format':172,182 'get':181 'go':72 'high':121 'input':12,18,52 'instead':102 'interperet':131 'issu':186 'latch':114,120 'left':178 'lemmi':164 'like':105 'line':4,28 'll':81,101 'loop':8,79 'low':115 'lower':16,92,148 'note':163 'other':199 'output':96,106,118,122,124,140,143 'presum':198 'realli':23 'regist':138,147,150 'result':43 'right':34,190 'sequenti':95 'shift':31,98,116,137,146,149 'someth':104 'start':50,83 'symbol':174 'thing':47 'time':70 'two':3 'upper':10,89,145 'valu':87,99,107,119,123,125 'want':103,135 'would':197"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4055088"
+editedAt: DateTimeImmutable @1695883315 {#4168
date: 2023-09-28 08:41:55.0 +02:00
}
+createdAt: DateTimeImmutable @1695856746 {#4169
date: 2023-09-28 01:19:06.0 +02:00
}
} |
|
Show voter details
|
16 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4173
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
The first two lines of the for loop,\n
\n
```\n
\n
<span style="color:#323232;">byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;">byte lower_byte = input_bin & 0x00FF;\n
</span>\n
```\n
\n
don’t really accomplish anything. The first line is bit shifting to the right 8, and then you just bitwise and it resulting in the same thing. For example, starting with `input_bin`:\n
\n
```\n
\n
<span style="color:#323232;">1000 0000 0000 0000\n
</span><span style="color:#323232;">>> 8\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span><span style="color:#323232;">& 0xFF\n
</span><span style="color:#323232;">0000 0000 1000 0000\n
</span>\n
```\n
\n
So, every time you go through a cycle of the for loop, you’ll just start with the same values in `upper_byte`, and `lower_byte`. To sequentially output each shifted value, you’ll instead want something like:\n
\n
```\n
\n
<span style="color:#323232;">output_value = 0b1\n
</span><span style="color:#323232;">for i = 1 to 16:\n
</span><span style="color:#323232;"> latch(low)\n
</span><span style="color:#323232;"> shift_out(output_value)\n
</span><span style="color:#323232;"> latch(high)\n
</span><span style="color:#323232;"> output_value = output_value << 1\n
</span>\n
```\n
\n
That is, if I interpereted correctly that you want the shift registers to output the following:\n
\n
```\n
\n
<span style="color:#323232;">output_count, upper_shift_register, lower_shift_register\n
</span><span style="color:#323232;">1, 00000000, 00000001\n
</span><span style="color:#323232;">2, 00000000, 00000010\n
</span><span style="color:#323232;">3, 00000000, 00000100\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">.\n
</span><span style="color:#323232;">16, 10000000, 00000000\n
</span>\n
```\n
\n
Note: Lemmy has a bug where it doesn’t format some symbols correctly, so the left angle bracket gets formatted as `<`. The same issue exists for the right angle bracket, the ampersand, and I would presume others.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695882894 {#4167
date: 2023-09-28 08:34:54.0 +02:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4174 …}
+nested: Doctrine\ORM\PersistentCollection {#4176 …}
+votes: Doctrine\ORM\PersistentCollection {#4178 …}
+reports: Doctrine\ORM\PersistentCollection {#4180 …}
+favourites: Doctrine\ORM\PersistentCollection {#4182 …}
+notifications: Doctrine\ORM\PersistentCollection {#4184 …}
-id: 29950
-bodyTs: "'0000':55,56,57,59,60,62,64,65,67 '00000000':152,155,158,162 '00000001':153 '00000010':156 '00000100':159 '0b1':108 '0x00ff':20 '0xff':63 '1':111,126,151 '1000':54,61,66 '10000000':161 '16':113,160 '2':154 '3':157 '8':14,35,58 'accomplish':24 'ampersand':194 'angl':179,191 'anyth':25 'bin':13,19,53 'bit':30 'bitwis':40 'bracket':180,192 'bug':167 'byte':9,11,15,17,90,93 'correct':132,175 'count':144 'cycl':75 'doesn':170 'everi':69 'exampl':49 'exist':187 'first':2,27 'follow':142 'format':172,182 'get':181 'go':72 'high':121 'input':12,18,52 'instead':102 'interperet':131 'issu':186 'latch':114,120 'left':178 'lemmi':164 'like':105 'line':4,28 'll':81,101 'loop':8,79 'low':115 'lower':16,92,148 'note':163 'other':199 'output':96,106,118,122,124,140,143 'presum':198 'realli':23 'regist':138,147,150 'result':43 'right':34,190 'sequenti':95 'shift':31,98,116,137,146,149 'someth':104 'start':50,83 'symbol':174 'thing':47 'time':70 'two':3 'upper':10,89,145 'valu':87,99,107,119,123,125 'want':103,135 'would':197"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4055088"
+editedAt: DateTimeImmutable @1695883315 {#4168
date: 2023-09-28 08:41:55.0 +02:00
}
+createdAt: DateTimeImmutable @1695856746 {#4169
date: 2023-09-28 01:19:06.0 +02:00
}
} |
|
Show voter details
|
17 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
18 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4247
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would you not want to shift out the upper byte first? I could be misinterpreting your setup."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695848391 {#4241
date: 2023-09-27 22:59:51.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4248 …}
+nested: Doctrine\ORM\PersistentCollection {#4250 …}
+votes: Doctrine\ORM\PersistentCollection {#4252 …}
+reports: Doctrine\ORM\PersistentCollection {#4254 …}
+favourites: Doctrine\ORM\PersistentCollection {#4256 …}
+notifications: Doctrine\ORM\PersistentCollection {#4258 …}
-id: 29925
-bodyTs: "'byte':10 'could':13 'first':11 'misinterpret':15 'setup':17 'shift':6 'upper':9 'want':4 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4050427"
+editedAt: DateTimeImmutable @1695847279 {#4242
date: 2023-09-27 22:41:19.0 +02:00
}
+createdAt: DateTimeImmutable @1695847225 {#4243
date: 2023-09-27 22:40:25.0 +02:00
}
} |
|
Show voter details
|
19 |
DENIED
|
edit
|
App\Entity\EntryComment {#4247
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would you not want to shift out the upper byte first? I could be misinterpreting your setup."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695848391 {#4241
date: 2023-09-27 22:59:51.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4248 …}
+nested: Doctrine\ORM\PersistentCollection {#4250 …}
+votes: Doctrine\ORM\PersistentCollection {#4252 …}
+reports: Doctrine\ORM\PersistentCollection {#4254 …}
+favourites: Doctrine\ORM\PersistentCollection {#4256 …}
+notifications: Doctrine\ORM\PersistentCollection {#4258 …}
-id: 29925
-bodyTs: "'byte':10 'could':13 'first':11 'misinterpret':15 'setup':17 'shift':6 'upper':9 'want':4 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4050427"
+editedAt: DateTimeImmutable @1695847279 {#4242
date: 2023-09-27 22:41:19.0 +02:00
}
+createdAt: DateTimeImmutable @1695847225 {#4243
date: 2023-09-27 22:40:25.0 +02:00
}
} |
|
Show voter details
|
20 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4247
+user: App\Entity\User {#4186 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
}
+image: Proxies\__CG__\App\Entity\Image {#1970 …}
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Shift-register-missing-bits"
+title: "Shift register missing bits"
+url: "https://discuss.tchncs.de/pictrs/image/7da4f08e-8d93-4cf1-99c9-22f2aea08d32.png"
+body: """
Hey friends,\n
\n
I have a two [daisy chained shift registers](https://i.imgur.com/tZBQ45e.png) ([74AHC595](https://www.diodes.com/assets/Datasheets/74AHC595.pdf)) which are controlled via an ESP32. I want to set one output to high at a time before switching to the next.\n
\n
The code seems to work, but the outputs O_9 and O_10 are not [staying high](https://i.imgur.com/v5OOE1K.png) ([zoom](https://i.imgur.com/VpMbdW3.png)) after setting them, whereas all the other ones are working fine. This is the used code snipped:\n
\n
```\n
\n
<span style="color:#323232;">pinMode(SHIFT_OUT_DATA, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_CLK, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_N_EN, OUTPUT);\n
</span><span style="color:#323232;">pinMode(SHIFT_OUT_LATCH, OUTPUT);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">digitalWrite(SHIFT_OUT_N_EN, LOW);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">uint16_t input_bin = 0b1000000000000000;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">for(int i=0; i<17; i++){\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> byte upper_byte = input_bin >> 8;\n
</span><span style="color:#323232;"> byte lower_byte = input_bin & 0x00FF;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, LOW);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, lower_byte);\n
</span><span style="color:#323232;"> shiftDataOut(SHIFT_OUT_DATA, SHIFT_OUT_CLK, MSBFIRST, upper_byte);\n
</span><span style="color:#323232;"> usleep(10);\n
</span><span style="color:#323232;"> digitalWrite(SHIFT_OUT_LATCH, HIGH);\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"> delay(10)\n
</span><span style="color:#323232;"> input_bin = input_bin>>1;\n
</span><span style="color:#323232;">} \n
</span>\n
```\n
\n
Is there anything I’m doing wrong, or any idea on where the problem may lie? I’ve already tried looking for shorts and other error sources, but the design was manufactured on a PCB and no assembly issues are noticeable.
"""
+type: "image"
+lang: "en"
+isOc: false
+hasEmbed: true
+commentCount: 15
+favouriteCount: 13
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1695882892 {#2414
date: 2023-09-28 08:34:52.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1961 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1399 …}
+notifications: Doctrine\ORM\PersistentCollection {#2440 …}
+badges: Doctrine\ORM\PersistentCollection {#2436 …}
+children: []
-id: 2357
-titleTs: "'bit':4 'miss':3 'regist':2 'shift':1"
-bodyTs: "'/assets/datasheets/74ahc595.pdf))':17 '/tzbq45e.png)':13 '/v5ooe1k.png)':59 '/vpmbdw3.png))':63 '0':116 '0b1000000000000000':112 '0x00ff':131 '1':170 '10':52,158,165 '17':118 '74ahc595':14 '8':125 '9':49 'alreadi':189 'anyth':173 'assembl':208 'bin':111,124,130,167,169 'byte':120,122,126,128,146,156 'chain':8 'clk':89,143,153 'code':41,79 'control':20 'daisi':7 'data':84,140,150 'delay':164 'design':200 'digitalwrit':102,132,159 'en':95,106 'error':196 'esp32':23 'fine':74 'friend':2 'hey':1 'high':31,56,163 'i.imgur.com':12,58,62 'i.imgur.com/tzbq45e.png)':11 'i.imgur.com/v5ooe1k.png)':57 'i.imgur.com/vpmbdw3.png))':61 'idea':180 'input':110,123,129,166,168 'int':114 'issu':209 'latch':100,135,162 'lie':186 'look':191 'low':107,136 'lower':127,145 'm':175 'manufactur':202 'may':185 'msbfirst':144,154 'n':94,105 'next':39 'notic':211 'o':48,51 'one':28,71 'output':29,47,85,90,96,101 'pcb':205 'pinmod':81,86,91,97 'problem':184 'regist':10 'seem':42 'set':27,65 'shift':9,82,87,92,98,103,133,138,141,148,151,160 'shiftdataout':137,147 'short':193 'snip':80 'sourc':197 'stay':55 'switch':36 'time':34 'tri':190 'two':6 'uint16':108 'upper':121,155 'use':78 'usleep':157 've':188 'via':21 'want':25 'wherea':67 'work':44,73 'wrong':177 'www.diodes.com':16 'www.diodes.com/assets/datasheets/74ahc595.pdf))':15 'zoom':60"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1695910961
+visibility: "visible "
+apId: "https://discuss.tchncs.de/post/3882589"
+editedAt: DateTimeImmutable @1695842569 {#1793
date: 2023-09-27 21:22:49.0 +02:00
}
+createdAt: DateTimeImmutable @1695841461 {#2402
date: 2023-09-27 21:04:21.0 +02:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Would you not want to shift out the upper byte first? I could be misinterpreting your setup."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1695848391 {#4241
date: 2023-09-27 22:59:51.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@quiescentcurrent@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4248 …}
+nested: Doctrine\ORM\PersistentCollection {#4250 …}
+votes: Doctrine\ORM\PersistentCollection {#4252 …}
+reports: Doctrine\ORM\PersistentCollection {#4254 …}
+favourites: Doctrine\ORM\PersistentCollection {#4256 …}
+notifications: Doctrine\ORM\PersistentCollection {#4258 …}
-id: 29925
-bodyTs: "'byte':10 'could':13 'first':11 'misinterpret':15 'setup':17 'shift':6 'upper':9 'want':4 'would':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/4050427"
+editedAt: DateTimeImmutable @1695847279 {#4242
date: 2023-09-27 22:41:19.0 +02:00
}
+createdAt: DateTimeImmutable @1695847225 {#4243
date: 2023-09-27 22:40:25.0 +02:00
}
} |
|
Show voter details
|
21 |
DENIED
|
edit
|
App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "askelectronics@discuss.tchncs.de"
+title: "askelectronics"
+description: """
**For questions about component-level electronic circuits, tools and equipment.**\n
\n
Rules\n
-----\n
\n
1: Be nice.\n
\n
2: Be on-topic (eg: *Electronic*, not *electrical*).\n
\n
3: No commercial stuff, buying, selling or valuations.\n
\n
4: Be safe.\n
\n
---
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 154
+entryCommentCount: 1230
+postCount: 1
+postCommentCount: 4
+isAdult: false
+customCss: null
+lastActive: DateTime @1729413608 {#275
date: 2024-10-20 10:40:08.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 11
+apId: "askelectronics@discuss.tchncs.de"
+apProfileId: "https://discuss.tchncs.de/c/askelectronics"
+apPublicUrl: "https://discuss.tchncs.de/c/askelectronics"
+apFollowersUrl: "https://discuss.tchncs.de/c/askelectronics/followers"
+apInboxUrl: "https://discuss.tchncs.de/inbox"
+apDomain: "discuss.tchncs.de"
+apPreferredUsername: "askelectronics"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1727247714 {#269
date: 2024-09-25 09:01:54.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1687144409 {#271
date: 2023-06-19 05:13:29.0 +02:00
}
} |
|
Show voter details
|