Need help with first SX/B program

TCTC Posts: 1,019
edited 2010-10-17 - 07:01:29 in Microcontrollers
I am working on a small project that uses a dot matrix name tag with the microprocessor removed, and I am trying to learn how to program the SX. I have done some PBASIC programming, so I am using SX/B. I am getting a little stuck. I am making a 12 hour clock that will use a DS1302 to keep track of the time; right now I am trying to control the display. I have a somewhat working test program that counts from 0 to 9. But I cannot figure out what would be the best way to display the clock info. I took a shot at it but I am running out of space (I think).

Could someone please take a look at my code and give me some ideas or pointers on how I can make this program work. Now I don’t want anyone doing the work (that is my job) so if you can explain what I should do, I would be a happier person.

I have included my working test program “name_tag.SXB’
And I have included my problem program “Clock.SXB”

Thank you for any input.
"CONFIDENCE"
The Feeling you get before you truely understand the situation.

Comments

  • BeanBean Posts: 8,027
    edited 2010-10-15 - 20:16:28
    TC,
    It looks like you are not declaring your SUBs and FUNCs in the beginning of the program.
    That should take care of the errors.

    Bean
  • TCTC Posts: 1,019
    edited 2010-10-16 - 10:09:00
    Thank you bean i will give it a try. i am so used to PBASIC.
    "CONFIDENCE"
    The Feeling you get before you truely understand the situation.
  • TCTC Posts: 1,019
    edited 2010-10-16 - 18:19:44
    Thank you Bean, now I can continue learning. But I do have one easy question. I am having trouble understanding what the main deference is between SUB and FUNC. Could you or someone please shed some light on this subject?
    "CONFIDENCE"
    The Feeling you get before you truely understand the situation.
  • Shawn LoweShawn Lowe Posts: 601
    edited 2010-10-17 - 07:01:29
    TC-
    A subroutine doesn't return any values. A function does (though it doesnt have to).

    Hope that helps
Sign In or Register to comment.