« first day (18 days earlier)      last day (29 days later) » 

2:06 PM
@AdrianMaire Ah, nothing urgent in our exploratory/feasibility project. As we are newbies in bus servo, we don't need to setup any goal, not to mention any spec or schedule. I used to think we are using an Agile style, with frequent short meetings/chats and change our direction and goal time after time.
Yes, we are more or less doing similar things, except I am not on the way to HC126 with enable/disable Tx/Rx. But I have been casually thinking about how to solve the enTx/Rx thing within 200us. (1) I am not sure if you are using Rpi2B. If you use Rpi4B, your software en/Tx task might be faster and meet the 200uS limit. (2) I also thought about using hardware to en/Tx.
For example,TxD is connected to input of a D Flip/Flop. When TxD start bit comes, D F/F Q will enable TxD, and ~Q disable RxD. I did not go further, otherwise I might end up using NE555 like you.
Yes, I still have 3V/5V level conversions with my half duplex interface circuits. (1) TXS0104 does not work, because the Low level is around 1V, and have intermittent read errors. (2) HC03 + CD4050 is OK, but using two chips is a bit wasteful, (3) using HC03 only has a design problem, because inputting 5V signal to 3V3 Vcc HC03 doe not look right (CD4050 with 3V3 Vcc is OK, because CD4040 input is 5V tolerant).
But I think if I have a perfect interface, there might still be read/write errors because of noise, motor switching noises/spikes etc. So we will need to use check sum and resend message to solve this read/write error problem.
So I am now writing my python checksum function, but I am going very slow. I read the Arduino and Rpi libraries and thought about borrowing their checksum functions, but I found the logic/calculation is simple, so I decided to write the check sum function myself. But I forgot about the things like python "bytes" class, and mixed up with byte array, also hex strings, so it took me more than 10 hours to refresh my memory and clear my mind.
Anyway, I will go very slowly, to build a solid foundation, then to rush but without confidence in the functions I am writing. Bed time, see you later.
 
2:32 PM
"(1) I am not sure if you are using Rpi2B. If you use Rpi4B, your software en/Tx task might be faster and meet the 200uS limit"

I don't think so: operating system schedules task without hard-real time condition, i mean, the OS tries to give each process time to work, but it does not ensure each process will have the CPU between few milliseconds. Even using RT compilation of linux (which I tried), you will have to do a lot of tricks to get the hard-real-time of 200us all the time. Most probably it would work 2000 times and then fail once.
 
3:09 PM
@AdrianMaire Ha, I have not thought about it too carefully. I simple mindedly thought that higher clock speed means less time each instruction. So 2GHz CPU should run instructions two times faster than 1GHz CPU. I have not thought about the OS scheduling. I need to think again.
 

« first day (18 days earlier)      last day (29 days later) »