News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Trouble with USART

Started by midali, Jan 08, 2025, 02:14 AM

Previous topic - Next topic

david

Quote from: midali on Jan 13, 2025, 07:02 PMHi David ,

Sorry for late, I had a little cerebrovascular accident , so I miseed a time from forum . Now all are right .
I'm find in RC Microzone many strange things because the signal is different from piece to piece :)  .
For example ,the last  Microzone Rx measured have the end falling of all  PWM channels in the same time, except ch5 wich start rising .


Hi midali,
The channel encoding seems to have no standard and as long as the correct channels appear on the correct pins of the receiver then nobody really cares.  To have 5 out of 6 channels END at the same time is curious as it implies it would need prior knowledge of the individual duty cycles.  Are you sure it wasn't just that they were all centred on 1500uS?  Try varying some of those channels.  It's still very strange that Ch5 goes high at the same time.  To make the device you earlier described I think you will have to abandon the idea of sequential decoding and perhaps look at a high speed polling system that can scan the 6 channels in only 1 or 2 uS.
Take care and look after yourself there.

Cheers,
David

Pepe

#21
The interrupt routine is not conditioned by the serial communication speed.
The transmission on the slave is at 57600 and for 115200 you should put

Declare Hserial_Baud= 115200

midali

#22
Pepe,

Today I tested with Declare Serial Baud and I received only strange values , so mean that is something wrong with my hardware . Thank you again !

David ,
I made a capture with only 2 osciloscope channels .
With blue is CH5 from Rx and yellow is ch6 from Rx .
https://drive.google.com/file/d/1JgrWH6w6SxmQUnbeZS3ZcMrFuyMrTLyJ/view?usp=drive_link

Here is Ch4 and Ch6 from Rx , so you can see the same time to falling down the PWM :
https://drive.google.com/file/d/1LMXirEBCKnOJqPtbKtCaZ_EXeW4K7Sje/view?usp=drive_link

My device work well for my needs . I readed and storaged the individual pulses time for each pwm channel and when all pulses are down ,then send the values on serial . Its not work like a real Ibus but is perfect .




david

Hmmm.  The links you sent seem to require your permission to view but actually your description is enough.
If the project doesn't have to be universal and it's working for you then that's all that matters.
Call it a "proprietary" encoder and people will be impressed!

Cheers,
David


david

Hello midali,
I see what you mean about the two channels ending together.  Coincidence surely?
That's a fairly short frame time  - about 13mS?

Cheers,
David