​ ​ ​ ​ Simulation an input
Results 1 to 6 of 6

Thread: Simulation an input

  1. #1

    Default Simulation an input

    Hi,

    I am trying to stimulate an input on C4 of an 18M2.
    The datasheet is showing that it can be used as an input but a flowchart in Logicator will not let me stimulate it high like my other inputs.
    I do have it set as 'I', well it cannot be set to 'O'.

    I guess somewhere there might be a setting to tell it to not to act as a serial in?

    UPDATE.
    If I do not click 'run' to start the simulation program it will allow me to set the pin high and it turns yellow in the same way as my other inputs.
    As soon as I start the program running, stimulating C4 seem to act like a reset on the logicator program itself. (hope that makes some sort of sense)
    Last edited by Man_in_uk; 10-02-2018 at 17:17.

  2. #2
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,442

    Default

    Quote Originally Posted by Man_in_uk View Post
    As soon as I start the program running, stimulating C4 seem to act like a reset on the logicator program itself. (hope that makes some sort of sense)
    Yes; that's exactly how it works, as it would with a physical chip.

    You need to issue a DISCONNECT before trying to use C.4 as an input otherwise it will simulate as if a download initiation had occurred on the Download Serial In and the PICAXE will reset.

  3. #3

    Default

    Thanks for this.

    I can see connect/disconnect in the simulation tool bar but clicking on the word 'disconnect' does not seem to cure anything.

    What is the correct way to issue a disconnect?

  4. #4
    Senior Member
    Join Date
    Feb 2009
    Location
    Cheshire, England
    Posts
    2,496
    Blog Entries
    4

    Default

    You need to put a disconnect instruction in your code, so that when the PICAXE starts to run it 'disconnects' the ser in pin. ( i.e. stops monitoring for new download. )

    See http://www.picaxe.com/BASIC-Commands...on/disconnect/

  5. #5
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,442

    Default

    The DISCONNECT flowchart command can be found in the Flowchart Command list in the Advanced section.

  6. #6

    Default

    Everything is easy when you know the answer.
    Thanks for helping me out. I can now crack on with my project.

Bookmarks

Posting Permissions

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