PORTA Logic - Be the processor


Closed Thread
Results 1 to 30 of 30
  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default PORTA Logic - Be the processor

    Loading Flash movie...


    If it's too big to fit your screen, try this link, which will resize itself to the browser.
    It also let's you Zoom and Pan, in case you're tired eyes need a little help.
    http://www.pbpgroup.com/files/PORTA/PORTA.swf
    DT

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    OK well, as a game ... it's pretty "Lame".
    But the idea was to also pass on the way a PORT works.

    Surely someone has a comment on PORTA.
    "It Sucks" is a perfectly viable response.
    Other responses may apply.

    I'm just trying to see if I can "communicate" with Flash.
    My brain (what little is left) thinks more graphically than verbally.
    Sometimes I have a hard time getting my point across with words.

    Flash may give me that ability, but I'll never know if nobody says ...

    "Oh, I get it now", or the other possibility ... "HUH!".

    DT

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    It is pretty realistic. I fried several PICs using flash just like I do on the bench

    What would be nice would be a "I give up, show me" button. Or does that pop up if I fry enough?
    Dave
    Always wear safety glasses while programming.

  4. #4
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Not bad to you too Darrel.



    God damnit ....

    I'm Tafe qualified in Digital Electronics :P

    Nice job mate, very impressive


    Trent Jackson
    Attached Images Attached Images  

  5. #5
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Arh! the results of second attempts. I'm rusty as hell.



    I strongly encourage you to further this Darrel

    Trent Jackson
    Attached Images Attached Images  

  6. #6
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Thumbs up

    Very cool Darrel. Have you ever thought about marketing this type of approach as a tutorial series? Food for thought.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  7. #7
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    I had plans, many years ago, to do something like this, but with a bit of a twist. A complete digital electronics training / development system, half virtual (like what you have done here) -- and half "real". The real part would have plugged into your parallel port (of course today though you'd go with USB) -- and allowed the user to setup the circuits on it, just as they see it on their screen. The virtual side would check the circuit and spit out exercises to complete.

    I actually presented the idea to Silicon Chip. They thought it sucked harder than a heated vacuum cleaner..

    Trent Jackson

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Getting distracted, starting to think about bullet proof vests again.

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    Getting distracted, starting to think about bullet proof vests again.
    I have one with a hole in it you are more than welcome to use.
    Dave
    Always wear safety glasses while programming.

  11. #11
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I have one with a hole in it you are more than welcome to use.
    I hope it is a level IIIa type, because otherwise they're going to be sweating and shaking all over the place. Only the IIIa will protect against 0.44 caliber.



    Trent Jackson

  12. #12
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I have one with a hole in it you are more than welcome to use.
    Oh yeah ... I want one of those ... Not.

    Thanks for trying out the Flash yous guys.

    Do you feel like you better understand how a PORT works?

    I was thinking of trying Timer2 with the CCP module (without the game).

    DT

  13. #13
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    You won't be needing a vest Darrel. Too smart, genuine and kewl.

    Trent Jackson

  14. #14
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Do you feel like you better understand how a PORT works?
    I learned that I need to learn more. That is why I think a "I give up" option would be good.

    Before this I never really gave much thought as to how the guts of a port worked. After I fried two virtual chips with a score of 21 (I got lucky, the questions I got) I figure it is time to dig out the books.

    I will come back to take a test.
    Dave
    Always wear safety glasses while programming.

  15. #15
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Do you feel like you better understand how a PORT works?

    I was thinking of trying Timer2 with the CCP module (without the game).
    If you're willing to keep writing them, keep 'em coming. Very nice job!
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  16. #16
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    I can't see why Darrel couldn't come up with a complete online, virtual interactive, digital electronics tutorial.

    - Start off with discrete mathematics (truth tables, gates and boolean algebra)

    - Proceed onto counters, flip-flops etc ...

    - Interactive circuits which illustrate all of the gates which are used to build things like 4017 decade counters etc ...


    I think that people should really have a baseline understanding of all this before proceeding to deal with microcontrollers.

    Trent Jackson

  17. #17
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Really new concept ???

    Hi, Trent

    I think a person called Pascal MAYEUX already "wrote" this ... ( Pic internal simulation, Quizz and so on ...) "some" years ago ...

    May I add It works as a liitle Windows program ???

    His book " Learn Pic Programming" is stamped " 2001 " Year at "ETSF" French Editor ...

    BTW ... What to win for a 138 result ??? ( proof available @ 235 k Zipped file ...)

    Alain
    Last edited by Acetronics2; - 31st January 2009 at 13:37.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  18. #18
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    You know what Alain ...

    I'm beginning to wonder if I am truly mistaken about you. I could have sworn that you were one of these corrupted, vendetta-driven buddies of mine (Alain Mackie)

    Trent Jackson

  19. #19
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Do I get a prize or something?
    Attached Images Attached Images  
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  20. #20
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Do I get a prize or something?
    Hmmm, I guess being qualified to play with your own "PORT" isn't worth much when you're married.

    144 That's "Gross".
    Actually, I don't think I ever got higher than that either.
    And I knew the questions ...

    DT

  21. #21
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I can see a lot of really nifty tutorials with your Flash gadgets. Very cool stuff.

    This reminds me of the Microchip eLearning Flash-based training modules. Nice work
    DT. P.S. I had a 145 just before this one, but thought I could beat it. Didn't happen...;o}
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  22. #22
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    This reminds me of the Microchip eLearning Flash-based training modules.
    Sounds interesting. I'd like to see those.
    Can't seem to find them though. Google let me down?

    DT. P.S. I had a 145 just before this one, but thought I could beat it. Didn't happen...;o}
    Uh huh, suuure you did ...
    My next one will impose a 10pt handicap for anyone with Bruce in their username.
    not
    DT

  23. #23
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Here's the link to Microchips flash training modules; http://techtrain.microchip.com/x14/
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  24. #24
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Thumbs up Thanks Bruce!

    Those are pretty interesting.
    Gives me a few ideas too.

    DT

  25. #25


    Did you find this post helpful? Yes | No

    Default I/O Woes on 18F4420

    Your game was fun, I got a 109 (better hit the books again)

    I have been migrating an application from a 16F887 to a 18F4420. After some debug (few hardware issues - oops!) the two output ports are doing great (B & D). Thanks to you Darrel my Timer 01 interupt is clicking away. I was able to change the config1h register to use the 4x PLL oscillator. But I am having trouble getting my input ports (A & E ) to function (very ashamed )
    Oddly enough, there is one bit of the A port that works (bit 4). The rest of inputs on port A and E ignore me. Hardware check of pins show normal (pulled to Vdd via resistor with contact closure dragging them to Vss when applied)

    Below is the I/O setup from my program:
    ================================================== ======
    ' ~~~~~~~~~~~~~~~~~~~ Define A I/O Port and Define Analog I/O ~~~~~~~~~~~~~~~~~~~
    PORTA = %00000000 ' clearing bits as recommended in data sheet
    ADCON0 = %00000000 ' turn off all A/D
    ADCON1 = %00000111 ' turn off all A/D I/O points - make digital
    TRISA = %00111111 ' bits 0-5 declared as inputs

    ' ~~~~~~~~~~~~~~~~~~~ Define B I/O Port ~~~~~~~~~~~~~~~~~~~
    TRISB = %00000000 ' bits 0 declared as output


    ' ~~~~~~~~~~~~~~~~~~~ Define C I/O Port ~~~~~~~~~~~~~~~~~~~
    PORTC = %00000000 ' clearing bits as recommended in data sheet
    TRISC = %11110000 ' bits 4,5,6,7 defined as inputs
    ; LATC = %00000000 ' bits 0,1,2,3 declared as output

    ' ~~~~~~~~~~~~~~~~~~~ Define D I/O Port ~~~~~~~~~~~~~~~~~~~
    TRISD = %00000000 ' bits 0-7 declared as output
    ; LATD = %00000000

    ' ~~~~~~~~~~~~~~~~~~~ Define E I/O Port ~~~~~~~~~~~~~~~~~~~
    PORTE = %00000000 ' clearing bits as recommended in data sheet
    TRISE = %00000111 ' bits 0,1,2 declared as inputs
    ' bits 3-7 declared as output
    ' to prototype Application inputs
    ================================================== ======

    Does this look as you would expect? Got any other areas you would recommend I check - I think I am close to being able to recite the 18FXX2 data sheet, but it doesn't mean I might be overlooking something.

  26. #26
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try ADCON1 = %00001111. Deduct 1 point from your score...;o}
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  27. #27


    Did you find this post helpful? Yes | No

    Default Many thanks

    Wow Bruce you are correct! But did I miss an errata sheet or is my trouble reading the table in the attached document
    ---------------------------------------------------------------------------
    In any event I am back in the running. I owe you for this. You can take five of my points and add to your score.

    Thanks again
    Attached Files Attached Files

  28. #28
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I'm not sure what to tell you about the MS Word DOC, but here's what's in the 18F4420
    datasheet.
    Attached Images Attached Images  
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  29. #29


    Did you find this post helpful? Yes | No

    Default Data sheets for 18F442 (beware)

    I think I figured it out Bruce

    You provided data from Publication - DS39631E
    =============================
    PIC18F2420/2520/4420/4520
    Data Sheet
    28/40/44-Pin Enhanced Flash
    Microcontrollers with 10-Bit A/D
    and nanoWatt Technology
    =============================

    I was reading from publication - DS39564C (appears an earlier pub)
    =================================
    PIC18FXX2
    Data Sheet
    High-Performance, Enhanced Flash
    Microcontrollers with 10-Bit A/D
    =================================

    I don't remember how I got the one I was using, but it is WRONG
    concerning the ADCON1 register. I will be ceremonially disposing of the
    incorrect publication this evening, it is sure to be festive event.

    Once again "garbage in, garbage out".

    Thanks again

  30. #30
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    That one just covers the 18F242, 252, 442 and 452 series. Always download the one
    specific to the PIC you're using. Things change a good deal from one series to the next.

    Also check for & download any errata sheets that might be available. These can save you
    a LOT of time. Some series may have a problem not listed in the primary datasheet.

    The 18Fxx20 series have 5: http://www.microchip.com/wwwproducts...cName=en010270
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Cant change target processor to compile
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th November 2009, 18:31
  2. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  3. PIC's ports individual bits manipulation - how to?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 27th February 2007, 22:34
  4. 16f876 PortA set-up trouble?
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2006, 19:31
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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