상세 컨텐츠

본문 제목

Serial Communication Interface In Motorola 68hc11

카테고리 없음

by layloconskil1980 2020. 2. 23. 08:41

본문

I'm trying to interface between motorola 68HC11 and Visual C 5.0. Here's some doubts to clear:1) Can I access ports using inp and outp in Visual C5.0? How do they actually work? What if I'm going toinput a double word from a port? What function should Iuse?2) If I want to output a byte say $0A to address $7C00 of68HC11, how can I do that in Visual C 5.0?3) And how can I write assembly language codes in visualC 5.0? For your info, I'm using MFC AppWizard (EXE) tocreate a dialog-based program.Any help offered is very much appreciated!

1) as far as 'accessing ports' goes, the software side is the least of your problems. You first have to decide what kind of interface to use to the PC. Using a plugin card is generally considered the right choice only when there are pressing speed/bandwidth issues, and the amount of IO coming out of the card to the back of the PC is limited.There are several choices. If it must be plugin, then ISA (the old-style 0.1' pitch edge-connector expansion cards) until recently would have been the natural choice. It's quite easy to interface to, and runs quite slowly (by modern standards), so you do need any funky technology. Unfortunately Bill has it in for ISA, because there are a lot of old ISA cards out there that are not plug and play, and make folks' life difficult. So he has decreed that PCs meeting the 'PC99' standard shall Not Have Any ISA Slots.

Aiiieee!The only alternative is PCI, which as a protocol is fiendishly complex. However, two companies, AMCC and PLX make 'PCI bridge' chips which hide the muck and present you with a much simpler asynchronous interface that can run at any speed up to 33MHz. See and for full datasheets on these products.continuation2) This again is a hardware question before it is a software question. Only when you've decided how to interface the PC to the private memory of the HC11 can you ask the detail of how to drive that interface. There are two sides to this too: a) do you memory-map or io-map the PC side of this interface, assuming it is still plugin?

And b) do you use a modal or biphase multiplexing scheme to give both the PC and the HC11 access to the RAM.a) This one is easy, if it is plugin, for ISA use IO mapping. You can have one register holding the RAM address you want to access and another holding the data.

Motorola

Synchronous Serial Communication Interface

Memory mapping on ISA is poisionous because of the limited range of addresses available that are used as 'Dos high memory', even under '95. Under PCI it doesn't matter which you choose.b) modal: Either the PC or the HC11 has control of the RAM, the other is locked out until the one with control relinquishes it, biphase: On every clock, for half the time the PC has an opportunity to access the RAM, and the other half of the time the HC11 has control of it. Your choice.Either way you will need some 'glue logic' in an FPGA or EPLD to perform the interface and multiplexing logic, and its this that I was referring to.In fact recently I have done several designs where the entire system logic, including in one case a UART and the sequencing logic to send and receive characters down it, was written in VHDL and stuffed entirely into the EPLD, enabling me to get rid of the processor completely: if your job is simple you might like to consider that, because it's sure as hell easier than what you're planning.continued. Your solution seem excellent to me but before I surrender the points to you. Please help me with my doubts. The technology that you've mentioned is far beyond my scope of study:) However I'm building a Pole-Balancing Robot and I'm using Motorola 68HC11 as the microprocessor for the robot and I'm using a software program to monitor the process of the robot and the program is written in MSVC 5.0 as I mentioned earlier. Hehe.I'm interfacing the 68HC11 through a RS232 serial communication line.

When I'm using the Shell program for the 68HC11, I can input and output bytes or words to 68HC11 after linking the assembly file. But I'm now trying to perform the same job usingmy own program written in MSVC 5.0.

Interface

Serial Communication Interface Ppt

Of course the executable file created by MSVC should enable me to input or output byte to 68HC11. Do you have any suggestion for me?Thanks a lot! Justin,You don't have to reject an answer if you have followup questions, you just have to take no action and post a comment. Reject an answer if you feel it is inadequate or useless.My first suggestion is that your original question was complete junk for what you were actually asking, and I just spent 30 minutes responding to a request that is going to be of no use at all to you. Aiiiieeee!Let me bounce a rephrase of your question off you before I try to answer it this time.

Motorola 68hc11 Microprocessor

Just tell me if this is what you're really really asking.' I'm Justinng! I have this serial device connected to a PC via a COM Port! How can I send and receive bytes down the serial link using Win32/MFC or whatever?

And another thing. You know M68HC11s? How does the on-chip UART work? Any suggestions for a command protocol? Please help me! I'll give you all my money! And you can date my sister!

Is it a deal?' You cannot directly perform writes into the memory map of the HC11 from the serial port. Instead you must use a command protocol to describe what function the PC is asking for.An example might be,( = is what the PC sendswhat the HC11 sends )00 12 34 55 request to write 55 into HC11 ads 123401 12 34 request to read HC11 ads 1234 (HC11 returns 55)and so on. Or you might choose to give higher-level meanings to the command protocol, such that00 01 5A means turn axis 01 90 degreesit's up to you.You do not need to use 80x86 Assembler at any point though. CreateFile and friends will take care of the interface to the actual COM port.Regards,-Andy.