Click here to Skip to main content
14,491,274 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Dear oh dear Pin
Sander Rossel24-Feb-20 0:25
professionalSander Rossel24-Feb-20 0:25 
GeneralRe: Dear oh dear Pin
phil.o24-Feb-20 6:09
mvephil.o24-Feb-20 6:09 
GeneralCounting bus cycles and nanoseconds, part 2 Pin
CodeWraith23-Feb-20 0:49
MemberCodeWraith23-Feb-20 0:49 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
Daniel Pfeffer23-Feb-20 1:05
professionalDaniel Pfeffer23-Feb-20 1:05 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
0x01AA23-Feb-20 1:39
professional0x01AA23-Feb-20 1:39 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
Daniel Pfeffer23-Feb-20 1:41
professionalDaniel Pfeffer23-Feb-20 1:41 
JokeRe: Counting bus cycles and nanosecons, part 2 Pin
0x01AA23-Feb-20 4:04
professional0x01AA23-Feb-20 4:04 
GeneralRe: Counting bus cycles and nanoseconds, part 2 Pin
CodeWraith23-Feb-20 1:40
MemberCodeWraith23-Feb-20 1:40 
Daniel Pfeffer wrote:
If you have a spare output pin and a spare input pin, you could connect them with RC (resistor + capacitor) circuit. When the output pin goes to 1, the voltage on the input should rise according to V * (1 - e-t/(R*C)). Check for when the input value changes. The number of cycles, R, C, and V should give you the answer.
That actually is a good idea. I actually already have something like that as a simple power-on reset. I would add a Schmitt trigger[^] to make the transition from the analog RC signal to a digital input less bumpy.

Edit: MacGuyver just told me about this: 74HC24: quad 2-input Schmitt trigger NAND gate

I am going to need a Schmitt trigger anyway and with NAND gatesI can build a simple RC oscillator, a flip flop that clocks itself, and eliminate the need for the output bit, of which I only have a single one. With a variable capacitor I should also be able to calibrate the frequency precisely enough. Just what frequency? Something in the range of 100Hz - 1kHz should be comfortable and precise enough.
I have lived with several Zen masters - all of them were cats.

His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.


modified 23-Feb-20 9:28am.

GeneralRe: Counting bus cycles and nanoseconds, part 2 Pin
Mircea Neacsu23-Feb-20 4:59
MemberMircea Neacsu23-Feb-20 4:59 
GeneralRe: Counting bus cycles and nanoseconds, part 2 Pin
CodeWraith23-Feb-20 6:06
MemberCodeWraith23-Feb-20 6:06 
JokeRe: Counting bus cycles and nanosecons, part 2 Pin
Nelek23-Feb-20 1:45
protectorNelek23-Feb-20 1:45 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
honey the codewitch23-Feb-20 1:46
mvahoney the codewitch23-Feb-20 1:46 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
CodeWraith23-Feb-20 2:13
MemberCodeWraith23-Feb-20 2:13 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
honey the codewitch23-Feb-20 2:49
mvahoney the codewitch23-Feb-20 2:49 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
CodeWraith23-Feb-20 4:04
MemberCodeWraith23-Feb-20 4:04 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
honey the codewitch23-Feb-20 6:20
mvahoney the codewitch23-Feb-20 6:20 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
CodeWraith23-Feb-20 6:34
MemberCodeWraith23-Feb-20 6:34 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
honey the codewitch23-Feb-20 6:35
mvahoney the codewitch23-Feb-20 6:35 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
CodeWraith23-Feb-20 7:01
MemberCodeWraith23-Feb-20 7:01 
GeneralRe: Counting bus cycles and nanosecons, part 2 Pin
honey the codewitch23-Feb-20 7:23
mvahoney the codewitch23-Feb-20 7:23 
GeneralYou never really know an algorithm like you do after you optimize it Pin
honey the codewitch22-Feb-20 21:56
mvahoney the codewitch22-Feb-20 21:56 
GeneralRe: You never really know an algorithm like you do after you optimize it Pin
Nelek22-Feb-20 22:08
protectorNelek22-Feb-20 22:08 
GeneralRe: You never really know an algorithm like you do after you optimize it Pin
OriginalGriff22-Feb-20 22:10
mveOriginalGriff22-Feb-20 22:10 
GeneralRe: You never really know an algorithm like you do after you optimize it Pin
honey the codewitch22-Feb-20 22:13
mvahoney the codewitch22-Feb-20 22:13 
GeneralRe: You never really know an algorithm like you do after you optimize it Pin
Nelek22-Feb-20 22:39
protectorNelek22-Feb-20 22:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.