Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ATMEGA128, codevision, LCD problem

Status
Not open for further replies.

rikie_rizza

Full Member level 6
Joined
Aug 5, 2006
Messages
331
Helped
29
Reputation
58
Reaction score
8
Trophy points
1,298
Location
Bikini Bottom, between a rock and a pineapple
Activity points
3,173
codevision lcd

I foolishly design a system using ATMEGA128, and then I connected the LCD using PORTF. When I try to program the system using codevisionAVR and try to setup the LCD, it dont have an option for PORTF.

The information from the 'help' said that I cannot use port F for LCD communication.

Any solution? I hope the solution is not redesign.

thanks
 

atmega128 codevision

you can use another port because number of pins for the port must to be 8 else you cant connect it to drive lcd
or try to put the address of portf in the programme without using codevision wizard
 

atmega128 problem

Heloo,
There are 2 solutions for you:
1. Redesign and use another port.

2. If you cannot redesign, then you cannot just skip the codevision wizzard and put the address of PORTF in the program because in ATMEGA128 the PORTF and DDRF addresses are above $00 to $1F range of CBI and SBI instructions( read Note 2 at the end of Register Summary in ATMEGA128 datasheet). Another reason is that DDRF, PINF and PORTF registers need to be in a specific order (see lcd.lib), and for ATMEGA128 they aren't.

The solution is to modify the lcd.lib so that instead of using CBI and SBI to access the port, you'll be using STS, LDS, etc.

Best regards,
rosu
 

lcd atmega128 codevisionavr

rikie_rizza said:
...Any solution? I hope the solution is not redesign.
thanks

..in my opinion, The Author of CodeVisionAVR, dont want to use PORTF for IO for LCD interface, because PORTF is for ADC channel (0..7)

..so the solution, if you still wish to use PORTF, and on your design you not use ADC (..Atmega128 internal ADC module), so you must create you self LCD library routine,
there is easy to get such library written on C, ex.. you can visit www.microsyl.com, there is a c code for LCD character / graphics, write in C,but its intended for imagecraft ICCAVR, but i think its easy to PORT to CodevisionAVR, because its ANSI C, another link is www.avrfreaks.net
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top