Skip to main content
12 events
when toggle format what by license comment
Mar 2, 2021 at 5:49 comment added Lawliet Please help me with this issue @edgar-bonet . QuestionLink
Feb 28, 2021 at 3:18 comment added Lawliet The reason why I'm using PCINT is I have to use one IMU- which is I2C :: for that I have to access scl and sda pins , Then I have 4 in one setup and 8 servos in another setup that also have to be used , and finally I have to measure the rpm of 4/8 motors also . So for this which all pin combination will you suggest. (1.) Receiver :: 6/8 channels - width to be calculated (2.) I2C :: (3.) 4/8 :: servos (4.) 4/8 :: speed measuring sensors
Feb 28, 2021 at 2:33 comment added Lawliet with your advices I tried to write a program with 16bit timer and I am getting some sort of error in the consistency of measuring the clock tick . please have a look . link
Feb 27, 2021 at 22:04 comment added Edgar Bonet @Lawliet: See amended answer.
Feb 27, 2021 at 22:03 history edited Edgar Bonet CC BY-SA 4.0
+ answering extra questions.
Feb 27, 2021 at 16:45 comment added Lawliet Doubt1: Why did you take tcnt2 < 128 when tcnt2 max is 256 . ?
Feb 27, 2021 at 16:32 comment added Lawliet Also what will we do if we have 8 channels as in the radio receiver. ?
Feb 27, 2021 at 16:30 comment added Lawliet please have a look at my question edits and please advice.
Feb 27, 2021 at 16:19 comment added Edgar Bonet @Lawliet: You have only 3 pin change interrupts. Reading 6 channels would make the ISRs more complex, as they would need to find out which channels triggered the interrupt. I would rather use regular external interrupts, as there are 6 of them available on the Mega (INT0–INT5). You could use a template to void repeating code.
Feb 27, 2021 at 15:43 vote accept Lawliet
Feb 27, 2021 at 14:49 comment added Lawliet How to modify the same for using with 6 channels .? sorry but I am getting confused ..
Feb 27, 2021 at 14:31 history answered Edgar Bonet CC BY-SA 4.0