Hi, where can I find c routine for MAX3100 irda - 8051 (set, send, receive)? I was able only to find assembler code for UART<->irda.
thanks
have you tried "MAX3100 code" on Google ?
Yes, Only found PIC, assembler code or 3100 user manual references...
Isn't that enough, then?!
Are you looking for info on SPI or the MAX3100 or both?
I think that routine provided by Maxim is for non-ISP uC. They use one 8051, it's UART and 4 ports only to transfer UART<->Irda but I think that is unnecessary. I need some way to “substitute†standard 8051's UART with Irda (using max3100). Just to use some type of SetIrda / WriteToIrda / ReadFromIrda functions if that is possible? ISP communication could also be the option but maybe more 8051-generic solution could fit better.
You are limiting your self in such a way that you will not find anything. What you want is very specific. If someone did it and posted it lucky you other wise. Part 1) the Max3100 requires SPI to talk to it Part 2) once you have SPI you need the configure the MAX3100 registers and be able to send and receive data to it. Part 3) irDa is a whole protocol if you found working open source code then start with that. An irDa is the kind code people buy rather than write their own.
I am not sure why you care is the CPU is ISP or not. Most 8052 works on other 8052 CPU's Except of course manufacture specific stuff. Unless you are lucky you will have to modify / write some code.
The example code at www.maxim-ic.com/.../8051.DOC is standard 8051 assembler - it will work with any 8051!
It's only two pages: it really shouldn't be that hard to convert to 'C' - especially as most of it is just loading SFRs!
Assembler:
MOV TMOD,#20H ;t1 baud
simply becomes:
TMOD = 0x20;
It uses bit-banged SPI - if your chip has hardware SPI, then you can convert to using that yourself.
OK,
thank you all.