timotet 44 Posted December 9, 2011 Share Posted December 9, 2011 there is no other code just the stuff from the original post Quote Link to post Share on other sites
bluehash 1,581 Posted December 9, 2011 Share Posted December 9, 2011 I took both programs and put them in the same project then tried to compile, am I doing this wrong? What does "both programs" mean? Quote Link to post Share on other sites
timotet 44 Posted December 9, 2011 Share Posted December 9, 2011 The 2 that opossum posted his printf.c and his test code. I wanted to run the the example he had posted. thanks again Bluehash :thumbup: Quote Link to post Share on other sites
bluehash 1,581 Posted December 9, 2011 Share Posted December 9, 2011 Np.. The program should work right out of the box. Are you sure you are compiling the right program? I'm assuming this is CCS? Quote Link to post Share on other sites
timotet 44 Posted December 9, 2011 Share Posted December 9, 2011 yep CCS ver 4.2.4 Am I supposed to combine the 2 programs into 1? I have 1 project with 2 source files now. Quote Link to post Share on other sites
bluehash 1,581 Posted December 10, 2011 Share Posted December 10, 2011 Could you zip up your project and attach it here? Quote Link to post Share on other sites
timotet 44 Posted December 10, 2011 Share Posted December 10, 2011 sure here it is printf.zip Quote Link to post Share on other sites
timotet 44 Posted December 10, 2011 Share Posted December 10, 2011 Im sure it is something simple I tried it in another project with the same results thanks again Quote Link to post Share on other sites
oPossum 1,083 Posted December 10, 2011 Author Share Posted December 10, 2011 You also need serial.asm from here It will all fit in a 2211/2231. bluehash and timotet 2 Quote Link to post Share on other sites
timotet 44 Posted December 10, 2011 Share Posted December 10, 2011 so do I just stick the .asm file in my existing project? Thanks guys Quote Link to post Share on other sites
bluehash 1,581 Posted December 10, 2011 Share Posted December 10, 2011 It will be in a separate file - serial.asm I totally forgot about putc() Working project attached. printf_1.zip oPossum and timotet 2 Quote Link to post Share on other sites
timotet 44 Posted December 10, 2011 Share Posted December 10, 2011 Thanks Bluehash What did you change? I added the serial.asm to the original project and still could not get it to compile. Quote Link to post Share on other sites
bluehash 1,581 Posted December 10, 2011 Share Posted December 10, 2011 I made a new project. Copied the two code snippets from the first post into two different files. Also added serial.asm as a separate file. timotet 1 Quote Link to post Share on other sites
timotet 44 Posted December 10, 2011 Share Posted December 10, 2011 So I tried just for fun to re-build the project from scratch. I started a new project in CCS. I copied the code from the beginning of this thread, and the serial.asm code from the post oPossum pointed out. 3 separate files one project. Tried to compile no dice! compared the project with the one you posted that works great. The only difference I found was when I copied and pasted the .asm file from the the other post the file ends up indented to the right by 4 spaces in the editor window , and wont compile. I removed the 4 spaces from each line and it works great. Maybe this will help someone maybe not. thanks for the great code oPossum, and thanks for helping me get it going bluehash! This forum is awesome!!! :clap: woodgrain 1 Quote Link to post Share on other sites
timotet 44 Posted December 15, 2011 Share Posted December 15, 2011 so I've been using this with my project and it is awesome. 2 questions : 1. Does the above post make any sense? A friend of mine that has programmed for a long time says it shouldn't matter if it is spaced over. CCS didn't seem to like it though. 2. oPossum could you give an example of a putc function for writing to an LCD with the printf code you posted. I am not understanding how the printf would interact with the LCD code. thanks Tim Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.