Results 1 to 8 of 8

Thread: What language(LOW-LEVEL) should I learn??(ASSEMBLY , ABEL,CUPL...) ??

  1. #1

    What language(LOW-LEVEL) should I learn??(ASSEMBLY , ABEL,CUPL...) ??

    Hi

    What language should I learn ??
    My goal is to learn a LOW-LEVEL langauge to program PLDs(Programable Logic Device) such as PIC's(Programable Integrated Circiuts),ROMs,RAMs...etc

    I have bought a book about Digital Electronics and it requires me to learn a PLD-language such
    as: ABEL, ASSEMBLY,CUPL...etc.
    Can this type of programming be done in C/C++??

    Wich is best??
    Any other language suited for this??
    Any advice would be of great help.

    CHEERS
    ******
    Beware, you who seek first and final principles, for you are
    trampling the garden of an angry God and he awaits you just beyond the last theorem.

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    PLDs(Programable Logic Device) such as PIC's(Programable Integrated Circiuts)
    PIC's are not PLD's. PLD's are gate array logic that you program by blowing fuses to alow for various logic to be programmed into the chip.

    ABEL code is supposed to by really difficult, Ive used PALASM, this is reallt easy...ive used it with GAL22V10's for a variety of tasks and it was easy.

    PIC's can be programmed in many different langagues, ASM, BASIC, C

    C++ isnt used generally in embedded system work, it tends to be standard C. C is a good langauge to learn as its similar across all systems. ASM varys greatly for instance on the PIC it uses a RISC system, on the PIC if im not mistaken theres 44 instructions. theres more on teh x86 and the instructions are used differently.

    ROM are just a place to store instructions. RAM is just memory used in processing operations, you dont actually program either of these to.

    Wich is best??
    Any other language suited for this??
    Any advice would be of great help.
    This really depends on your task, what do you want to do??

    i2c

  3. #3
    I already know C/C++(not a pro), and I would like to ,basically, learn to program PIC's.....
    If i can do it in C/C++ that would be great,but I dont have any resources to help me learn to program PIC's in C/C++.

    Can you perhaps give me a URL or a book reference to help me??
    I am currently reading a book named: "Digital Fundamentals by Thomas l. Floyd/Prentice Hall"
    it mostly teaches PLD's,Registers, Encoders...etc, but nothing about PROGRAMMING and nothing about PIC's.

    I wrote this thread: http://www.antionline.com/showthread...548#post735548(please read this)

    then I bought the above book, and now I am am back at the start.....

    In a nutshell my question is: How do I send a HIGH(1) or a LOW(0) to the serial or parrallel port in C/C++???


    /////EDIT
    Is there a HEADER(*.h) file or something that I can use???
    Beware, you who seek first and final principles, for you are
    trampling the garden of an angry God and he awaits you just beyond the last theorem.

  4. #4
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    350
    There is an assembly code "backdoor" in C++. Google it. But you still have to know assembly to use it.
    Geek isn't just a four-letter word; it's a six-figure income.

  5. #5
    Originally posted here by AxessTerminated
    There is an assembly code "backdoor" in C++. Google it. But you still have to know assembly to use it.
    From the movie Training day:
    Alonzo: Tell me a story.
    Jake: Like my story?
    Alonzo: No, not your story, a story. Since you can't keep your mouth shut long enough for me to read my paper, tell me a story.
    Jake: I don't think I know any stories.
    Alonzo: You don't know any stories?
    Jake: Nah.
    Alonzo: All right, I'll tell you a story. This is a newspaper, right? It's 90% bullshit, but it's entertaining. That's why I read it, because it entertains me. You won't let me read it, so you entertain me with your bullshit. Tell me a story right now. Go.

  6. #6
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    How do I send a HIGH(1) or a LOW(0) to the serial or parrallel port in C/C++???
    Serial ports harder to program that the parrallel, becuase it works in serial, so all info comes off in a serial fashion meaning it has to be decoded outside the computer if you see what I mean..With the parrallel port you can bit bash on it so changing the values of various pins to 1 and 0 with relative ease.

    Programming the ports is pretty OS specific. What you on??

    http://www.lvr.com/parport.htm
    http://www.beyondlogic.org
    http://www.phrack.org/phrack/50/P50-11

    those links mostly contain info about parport programming, the phrack article contains by far the best documented code, although its for under linux, but its very similar to windows, you just need to change the header file and the inb and outb syntax to work with windows.

    As for the serial port

    http://www.easysw.com/~mike/serial/serial.html
    http://www.lvr.com/serport.htm

    I only use terminal programs for the serial port, If im rite you can also do something like "com1 > jdaksfhsdf" at the dos prompt to output "jdaksfhsdf" to the serial port. if you reverse the > to < then you can recieve to.

    If mostly used termial programs for serial port stuff. Like hyperterminal. I did this when I created a data link between something and my computer using some old cordless telephones.

    You must remember also that when messing with any of these ports you need to provide some sort of protection to the computer in the likely event you mess up (Ive done it...) think opto-isolators or buffers.

    also remember that the ports are incable of supplying vast amounts of current (I) so you need to use transistors, relays or motordriver chips to provide enough current to dirve things like motors, solinoids or other current sucking devices.

    Check out http://www.seattlerobotics.org/encoder fo things about programming PIC's. PIC's are quite simple to program, youll need to make a program so you can load a bootstrapper into them so you can do in board programming. A cheap one is the no parts programmer. Google for that.

    Any more help just ask

    i2c

  7. #7
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    Ohhh yea, I forgot to mention sorry. Im thinking about writing an tutorial on hardware interfacing...is anyone bothered? what do the senior people think?

    cheers i2c

  8. #8
    Thanx I2C for the links and all the help, its great.
    At this moment I only have like 5 minutes to view this thread and reply......

    I will contact you for sure when I surf again...
    My OS is win98.

    And it would add great depth to AO if you write a tut in hardware interface('be 1st to read it),
    AO should start an Electronics/Hardware Forum...

    I'll try to respond(in full) by tommorow.
    Thanks again....
    Cheers.
    Beware, you who seek first and final principles, for you are
    trampling the garden of an angry God and he awaits you just beyond the last theorem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •