Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-02-2011, 09:08 AM   #371 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Ian pretty much summed it up. Also, if you press SW2 AFTER power up it will toggle the green LED with each press.
Bill, are you sure you're setting bit 2 of Sysval? Try this-
Constant Sysval= B'10000100'
Third bit in from the right is bit 2

  Reply With Quote
The Following User Says Thank You to Freyguy For This Useful Post:
Brose (08-02-2011)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-02-2011, 05:20 PM   #372 (permalink)
ManofGod
 
Join Date: Mar 2011
Location: Arkansas
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
Eureka! All is WELL!

You guys just don't know how much help you have been in getting this LCD up and running. My problems turned out to be a combination of things. I was having some programming problems and I had a trace on switch 1 that was bad so I had to get out the old schematics and trace it down so I could rewire the switch going directly to the resistor that it came from. I first made the tap on the wrong side of the resistor but after a lot of head scratching and your help with the firmware (WE) and I stress WE got it all working as prescribed. I really thought I would loose my mind while trying to figure this thing out. But thanks to some great advice and a little troubleshooting all is well!! Again thanks a Lot. But next comes hooking the lcd and the controller together and getting them to communicate. I am not there yet but will be soon. Have a great day.

Bill
  Reply With Quote
Old 08-03-2011, 08:56 AM   #373 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Quote:
Originally Posted by Brose View Post
... I was having some programming problems and I had a trace on switch 1 that was bad so I had to get out the old schematics and trace it down so I could rewire the switch going directly to the resistor that it came from....Bill
Bill, which batch was your pcb from? The first ones from harlequin2 without silkscreen or the second run from Ian? Others who have not yet assembled their boards may want to be aware of the possibility of this trace being bad on theirs as well.

-Chris
  Reply With Quote
Old 08-03-2011, 07:31 PM   #374 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2010
Location: Annapolis
Posts: 159
Thanks: 0
Thanked 32 Times in 27 Posts
I'll complete this translation if others find it useful:

cougarlcd.c - obd2-instruments - Automotive CAN bus implemention including OBD2 reporting and gauge/display drivers - Google Project Hosting


* cougarlcd.c: Translation of the Cougar LCD code from ASM to C. */
/*
Written 2011 by Donald Becker and Hugo William Becker, based on
ASM code written by Chris Freyman.

This file contains a translation from 'cougarlcd_v1_4b.ASM' to C.
We wrote this to understand and support the hardware platform with
our OBD2-instruments system. A independently written source file
implements similar functionality with the addition of CAN support.

The build environment is the SDCC compiler, with its library and
include files.
*/
  Reply With Quote
The Following 2 Users Say Thank You to DJBecker For This Useful Post:
Brose (08-05-2011), sawickm (08-05-2011)
Old 08-04-2011, 01:33 AM   #375 (permalink)
ManofGod
 
Join Date: Mar 2011
Location: Arkansas
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
The board was from the batch that have the silkscreen. Once you find the problem there is really no problem fixing it. If anyone needs more detailed info I will be glad to post it. This may of just been a fluke with this board only. The main thing is that it is fixable.

Thanks Again

Bill
  Reply With Quote
Old 08-04-2011, 09:36 AM   #376 (permalink)
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Quote:
Originally Posted by DJBecker View Post
I'll complete this translation if others find it useful:

cougarlcd.c - obd2-instruments - Automotive CAN bus implemention including OBD2 reporting and gauge/display drivers - Google Project Hosting


* cougarlcd.c: Translation of the Cougar LCD code from ASM to C. */
/*
Written 2011 by Donald Becker and Hugo William Becker, based on
ASM code written by Chris Freyman.

This file contains a translation from 'cougarlcd_v1_4b.ASM' to C.
We wrote this to understand and support the hardware platform with
our OBD2-instruments system. A independently written source file
implements similar functionality with the addition of CAN support.

The build environment is the SDCC compiler, with its library and
include files.
*/
Thanks DJ. I really appreciate this. Particularly the cheap shots you took in your comments. I am a hardware guy with this representing only my second attempt at writing PIC code. I don't know C , am not a programmer (which I made clear at the beginning of this thread). I only even started this as a goodwill gesture at sharing a project I thought other cougar owners would find useful.
I'm done here.
  Reply With Quote
The Following User Says Thank You to Freyguy For This Useful Post:
sawickm (08-05-2011)
Old 08-04-2011, 11:33 AM   #377 (permalink)
EcoModding Lurker
 
Join Date: Apr 2011
Location: SLOVENIA
Posts: 10
Thanks: 1
Thanked 3 Times in 2 Posts
Programming PIC with ART2003 and WINPIC800 - anyone?
- I try : PIC 2480, latest firmware (1.4b), LVP-on, programing sucsesful, vryfing OK,
BUT not working when placed into LCD PCB
Suggestion ?
(greetings from Slovenia-EU)
  Reply With Quote
Old 08-04-2011, 02:14 PM   #378 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2010
Location: Annapolis
Posts: 159
Thanks: 0
Thanked 32 Times in 27 Posts
Quote:
Originally Posted by Freyguy View Post
Thanks DJ. I really appreciate this. Particularly the cheap shots you took in your comments. I am a hardware guy with this representing only my second attempt at writing PIC code. I don't know C , am not a programmer (which I made clear at the beginning of this thread). I only even started this as a goodwill gesture at sharing a project I thought other cougar owners would find useful.
I'm done here.
Actually, I thought that you would be a little miffed at a pointless conversion from carefully written, tight ASM into C code that inevitably takes more code and data space.

I must say, if that's really only your second project, it's amazing well structured code. I would have guessed that it started as the output from an optimizing compiler and was then hand tuned and optimized. It's way better than the code produced by many professional programmers. (And I've done a *lot* of formal and informal code review.)

I hope you understand that the real point of this was so that I could write a CAN bus extension for you. To do that I needed to get a better understanding of your code so that I could make minimal changes. If you look at the CAN add-on I did for the Cougar code, I managed to hook into it with only two lines added to the main source file.
  Reply With Quote
Old 08-04-2011, 08:32 PM   #379 (permalink)
ManofGod
 
Join Date: Mar 2011
Location: Arkansas
Posts: 15
Thanks: 10
Thanked 0 Times in 0 Posts
Hope this is the right place to be asking this question. If not, please direct me. I have my LCD built and have finished my cougar controller. Is there any posts that deal with conecting the two together. I know how to physically connect them but not sure of what you do to as far as firmware compatibility. Can anyone help me get started.

Thanks,

Bill
  Reply With Quote
Old 08-05-2011, 07:25 AM   #380 (permalink)
EcoModding Lurker
 
Join Date: Dec 2010
Location: Dearborn, MI
Posts: 13
Thanks: 11
Thanked 3 Times in 3 Posts
@ Freyguy

I for one appreciate all you have done with this and your patience with those of us who have less experience than yourself. This is a great addition and I am extremely grateful for you sharing it with us. I was just thinking the other day how impressive it was that there were folks on this forum that understand hardware AND software and are able to "marry" the two together and then share with us. I can barely keep up with the assembly.

You may recall that I miswired my display and "let the smoke out of it". In the past week I decided to see if I could fix it. Because of all the great information you provided on this thread and in your documentation I was able to trace the problem down to the two diodes. They shorted when I applied voltage to the wrong pins and after replacing them I think I now have it working.

I would hate to see you go and wish you would continue sharing your knowledge, but I completely understand if you choose not to.

  Reply With Quote
The Following User Says Thank You to pnikolaj For This Useful Post:
Freyguy (08-19-2011)
Reply  Post New Thread






Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com