I found a slow, simple and realtime code free solution. I'll use /OE line as an interrupt source to the Attiny85 (8 or 16mhz). Whenever /OE goes from high to low it will cause an interrupt. I'll measure the time between each interrupt. Each access either Kernal or Basic will cause an interrupt on attiny85. Say to transmit 0101 I'll access Kernal (instruction should cause only on read) in following order, Access - Start of tranmission delay 200us Access delay 400us Access delay 200us Access delay 400us Receiving side will try to receive a byte if timing requirements are met, if not met then it will discard it. Once properly launched sender program will not access basic or kernal when it's not communicating, as such receiver will be in a clean state. To prevent accidental communication sender will send an initialization string (FOO or something) and then a command. Of course, for now the command will be just the index number of the kernal to switch to. Regards, Nejat ps1: I've previously used this exact method in one of my projects. Interestingly it only occured to me today that I could use it here too :) (now I reread the 1 wire protocol, actually it is very similar) ps2: After initialization, interrupts could be detached and spi slave transfer method could be used to increase the throughput. (no functionality comes to my mind though)Received on 2018-04-02 01:00:03
Archive generated by hypermail 2.2.0.