6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Sep 19, 2024 9:07 pm

All times are UTC




Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Wed Jan 08, 2020 1:44 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
Wow, I hope this does not [defend] (s/b offend) anyone, but this seems to have gotten complicated beyond reason. Why are we even talking about bit banging and interrupts?

Read a character from memory, send it out the UART. Correct me if I'm wrong, but this is the task, right?

If so, use a non-WDC 65C51, and use it in a simple poling mode.
Code:
Start Simulation:
     While there are characters to output:
          Read character from memory
          Loop:
               Check UART Transmitter
               If not busy then Exit Loop
          End Loop
         Send character
     End While
Repeat Simulation as required
End


The actual assembly code would probably have less characters, including the initialization procedure.

Since the CPU has no other tasks to deal with, implementing interrupts or bit banging seems like an unnecessary complication. Personally I think it's best not to teach Engineering students to implement unnecessary complications. Unless, of course, if they intend to work for BMW.

This could be done with as little as 5 chips if you are willing to use a GAL or something like that. That might be an idea, to show students how to use programmable logic to reduce complexity in the hardware.

Of course I could be mistaken :?

_________________
Bill


Last edited by BillO on Wed Jan 08, 2020 10:20 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 08, 2020 3:07 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
BillO wrote:
Read a character from memory, send it out the UART. Correct me if I'm wrong, but this is the task, right?
Yes.
Quote:
If so, use a non-WDC 65C51....
Which is suggestion #1 in my previous post. However, this conversation is actually split across three threads, and it's in this post in the first one that CaptainCulry settled on the W65C51:
CaptainCulry wrote:
I did consider a lot of other UART options. The older 6551 chips that don't have the bug, but they are kinda pricey used chips that take a month to ship from a recycling yard in china. I considered that DUART board that is on one of the hobby pages, and maybe putting an xbee on one of the UARTs. I thought about using a 6522, and an SPI MAX3100. But being that this is just going to be an appliance on a solder-less breadboard for now, all these options just seem to add unnecessary complexity that the project doesn't need, and I maybe don't need to have on my first build. The memory map is already bizarre enough.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 08, 2020 8:44 pm 
Offline

Joined: Tue Dec 31, 2019 12:30 pm
Posts: 30
BillO wrote:
Wow, I hope this does not defend anyone, but this seems to have gotten complicated beyond reason. Why are we even talking about bit banging and interrupts?

Read a character from memory, send it out the UART. Correct me if I'm wrong, but this is the task, right?

If so, use a non-WDC 65C51, and use it in a simple poling mode.
Code:
Start Simulation:
     While there are characters to output:
          Read character from memory
          Loop:
               Check UART Transmitter
               If not busy then Exit Loop
          End Loop
         Send character
     End While
Repeat Simulation as required
End


The actual assembly code would probably have less characters, including the initialization procedure.

Since the CPU has no other tasks to deal with, implementing interrupts or bit banging seems like an unnecessary complication. Personally I think it's best not to teach Engineering students to implement unnecessary complications. Unless, of course, if they intend to work for BMW.

This could be done with as little as 5 chips if you are willing to use a GAL or something like that. That might be an idea, to show students how to use programmable logic to reduce complexity in the hardware.

Of course I could be mistaken :?


You are absolutely right Bill. Actually I'm even going to use the chip with the very serious hardware bug, because in my application that bug isn't even a big deal at all. Mostly the discussions have just been needless rambling about the hardware bug and various options people could use to avoid it.

Even with the bug, in my simulation the code will be much like you described, just with a delay instead of checking the transmit flag. Not a big deal.

Code:
Start Simulation:
     While there are characters to output:
          Read character from memory
         Send character
         Delay for long enough that the character sent
     End While
Repeat Simulation as required
End


And the delay in this application is trivial to calculate, implement and test.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: