Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : BMC Menchester Code
Author | Message | ||||
Teo1 Newbie Joined: 06/05/2023 Location: RomaniaPosts: 25 |
Hi, Can anyone help me decode a BMC-Menchester signal? Thank you in advance, Teo |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
do you talk about https://en.wikipedia.org/wiki/Manchester_code ? |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 897 |
This link describes BMC. BiPhase Mark Code and Manchester Code It looks to describe a hardware decode. A PicoMite CSUB to timestamp pin changes (Manchester code?) Capturing 433MHz code on Picomite (Manchester code?) The above links might gives some ideas to decode in software on the Picomite. Latest F4 Latest H7 |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
Whether you can decode it in MMBasic will depend on the data rate. The Pico itself will very likely be capable, but it's a question of timing - especially when decoding. Welcome to the forum, Teo! :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 245 |
The PICAXE store still lists the NKM2401 chip which is a PIC12F508 microcontroller programmed with Manchester coding/decoding. Currently listed as out-of-stock. I have used pairs of these in the past with simple transmitter/receivers and they worked really well. Datasheet available here: https://picaxe.com/docs/axe213.pdf |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
The hex file is here NKM2401 Quazee137 |
||||
circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 245 |
Is it? I cannot access this page, are you able to download a copy? |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3804 |
I can see the file at that URL. John |
||||
Teo1 Newbie Joined: 06/05/2023 Location: RomaniaPosts: 25 |
HI, First of all, thanks so much everyone for your help. I need to receive the attached signal and convert it to RS232. The signal is BMC encoded at 250bps speed, consisting of 22 bits. In the example given, the first byte has a value of 92.The next 12 bits represent the number 1326, the penultimate bit is for parity and the last bit is for stop. Send LSB first. Sorry for my English. Any idea, help will be appreciated! Thanks in advance ! Teo BMC.pdf |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
Here NKM2401.hex.zip Quazee137 |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 897 |
@Teo Are you thinking of doing this with a Picomite? Is the data received continuously. Does it repeat the same data until it changes e.g a temperature etc? What is the line state when there is no data? How would it be converted to ASCII for the RS232 e.g. output the twenty bits as 5 hex characters. i.e. 52E5C or does it need decoding. I think it could be achieved with a tweak of one of the above CSUBs. Gerry Latest F4 Latest H7 |
||||
Teo1 Newbie Joined: 06/05/2023 Location: RomaniaPosts: 25 |
Hi Gerry, Yes, I use Picomit Data is received continuously . Repeat the same data until it changes. Depends on the state of the last transmission (see attached PDF). In the example ,in the PDF , we pass 92 in decimal and 1326 in decimal LSB first. Thanks in advance ! Teo |
||||
circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 245 |
Thanks for that; when I tried to access the page I was, for some reason, blocked. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
With 250bps you can do the whole decode in basic. No need for CSUB or PIO. use timer as time reference use a GPx set for both edges interrupt loop until bit counter reaches your threshold analyze array() in the interrupt routine - log pin status + time stamp timer to array() - increment bit counter MMBasic is fast enough to keep pace with 250bps. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Teo1 Newbie Joined: 06/05/2023 Location: RomaniaPosts: 25 |
Thanks a lot ! Teo |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2137 |
For anyone else that wants to play with decoding Teo's BMC.pdf this produces the data stream on another PicoMite. 'Generate continuous Manchester code stream Adjust the scale factor if the speed is wrong.OutPin = 1 'GP0 SetPin OutPin, DOUT 'bitstream intervals 1=2000uS ,2=4000uS, 4=8000uS Dim integer D(32)=(4,4,2,2,1,1,1,1,1,1,2,1,1,2,2,1,1,1,1,1,1,2,1,1,2,2,1,1,2,1,1,2,2) Math scale D(), 2000, D() Do Bitbang Bitstream OutPin, 33, D() Loop Edited 2023-07-01 18:11 by phil99 |
||||
Print this page |