Yes, this is pretty straightforward using a microcontroller with both a CAN Controller and a UART (Universal Asynchronous Receiver Transmitter). I have actually done this.Thank you for the reply. I am new to it please excuse me for asking any useless question.
I have a sensor which is using CAN protocol. Can I convert this into RS232 protocol or ttl logic?
Yes. That’s got a Microhip MCP2515 in it which is like the CAN module in many MCUs. It communicates to you MCU via the SPI interface.https://www.google.com/search?q=MCU+for+CAN+module&tbm=isch&chips=q:mcu+for+can+module,online_chips:arduino:hkXVF1PzQDI=&rlz=1C1SKPM_enPK666PK666&hl=en&sa=X&ved=2ahUKEwjyq4DBnNvzAhWQgf0HHWsGDxkQ4lYoBHoECAEQGg&biw=1499&bih=706#imgrc=bCrYPOE6ZfUx2M
I am using arduino mega2560 uC. I found this module on internet (link is atached). Can you please suggest me will it work?