??? 04/14/06 00:55 Read: times |
#114272 - I expect many problems Responding to: ???'s previous message |
Brecht,
You're using port0 for your control signals - you need to put pullup resistors from each pin you use to 5V. A value of 10k should be sufficient. The code that Peter sent you, you tell us that the compiler gave you errors, I would suggest you investigate these errors. Maybe you're using a demo version that is code limited? In which case you're eventually going to have the same problem with your code. Peter tells us his code works, but you didn't understand his pin connections and you've written your own code. I would suggest you ask Peter what processor he used and to explain his pin connections. You should also look at his code carefully to understand how it works. After seeing your pin connections, your code has no hope of working -see my comments in my first response. Hey, I'm feeling friendly today - Peter's code is on the bascom website http://www.bipom.com/appnotes/...n0025.shtm and I took the initiative to look for it. It helps if you put this info in your posts so others can help. Ok, Peter is using a bus interface, so you need a 74HCT573 latch connected to your cpu or you can keep your current setup and modify your dodgy code. Personally, I'd go with what has been shown to work. Read up on bascom51 and you'll find you can access the port bits directly without affecting the whole port. Here's a hint (and I don't use bascom!!) for a write using your setup: in initialisation: P0.0 =1 'wr high P0.1 =1 'rd high P0.2 =1 'ce high P0.4 =1 'reset high P0.4 =0 'reset the lcd Nop:Nop 'just a bit of a delay P0.4 =1 'no more reset Writec: Gosub Status_Check P2 = Data_display P0.3 =1; 'command P0.0 =0 'set wr low P0.2 =0 'set ce low P0.2 =1 'set ce high P0.0 =1 'set write high Return Writed: Gosub Status_check P2 = Data_display P0.3 =0; 'data P0.0 =0 'set wr low P0.2 =0 'set ce low P0.2 =1 'set ce high P0.0 =1 'set write high Return Status_check: 'check status controller Status_1: P2 = 0xff 'set P2 to input P0.3 = 1 'status P0.1 = 0 'rd low P0.2 = 0 'ce low Status = P2 'read the status value P0.2 = 1 'ce high P0.1 = 1 'rd high Mask_status = Status And 3 If Mask_status = 3 Then : Return End If Goto Status_1 Erik: - suggesting that Basic is slow suggests you've never heard of a basic compiler. There's lots of people using Basic Stamps out there and they use an interpreter - it must be fast enough for them! Using a compiler speeds thing up considerably - whilst I don't use bascom, I dare say most of the code it produces would be reasonably speedy. Again, speed is relative.... With all this help, it must be Easter or something........ |
Topic | Author | Date |
8051 --> T6963C | 01/01/70 00:00 | |
get your feet wet on doing something sim | 01/01/70 00:00 | |
simpeler | 01/01/70 00:00 | |
Evil | 01/01/70 00:00 | |
8051 --> T6963C | 01/01/70 00:00 | |
show link to lcd | 01/01/70 00:00 | |
schematic | 01/01/70 00:00 | |
init code | 01/01/70 00:00 | |
Probably best to post code ... | 01/01/70 00:00 | |
here u go | 01/01/70 00:00 | |
what tool are you using | 01/01/70 00:00 | |
Showing your ignorance Erik! | 01/01/70 00:00 | |
yeah, I have heard of it | 01/01/70 00:00 | |
Post circuit | 01/01/70 00:00 | |
Circuit | 01/01/70 00:00 | |
example | 01/01/70 00:00 | |
error messages make no sense | 01/01/70 00:00 | |
compiler | 01/01/70 00:00 | |
I expect many problems | 01/01/70 00:00 | |
Speed is relative..... | 01/01/70 00:00 | |
I see a half toshiba!!! :p | 01/01/70 00:00 | |
Toshiba | 01/01/70 00:00 | |
Bin To Hex | 01/01/70 00:00 | |
out of memory | 01/01/70 00:00 | |
Great | 01/01/70 00:00 | |
More info | 01/01/70 00:00 | |
Graphic files | 01/01/70 00:00 | |
Hardware and software | 01/01/70 00:00 | |
Bmp conversion solved![]() | 01/01/70 00:00 |