{"action":"created","issue":{"url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/2","repository_url":"https://api.github.com/repos/Smoothieware/smoothie-v2","labels_url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/2/comments","events_url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/2/events","html_url":"https://github.com/Smoothieware/smoothie-v2/pull/2","id":305518696,"number":2,"title":"Add ADC channel configuration on ADC-only pins","user":{"login":"tiagojbalmeida","id":34273996,"avatar_url":"https://avatars2.githubusercontent.com/u/34273996?v=4","gravatar_id":"","url":"https://api.github.com/users/tiagojbalmeida","html_url":"https://github.com/tiagojbalmeida","followers_url":"https://api.github.com/users/tiagojbalmeida/followers","following_url":"https://api.github.com/users/tiagojbalmeida/following{/other_user}","gists_url":"https://api.github.com/users/tiagojbalmeida/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojbalmeida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojbalmeida/subscriptions","organizations_url":"https://api.github.com/users/tiagojbalmeida/orgs","repos_url":"https://api.github.com/users/tiagojbalmeida/repos","events_url":"https://api.github.com/users/tiagojbalmeida/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojbalmeida/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-15T11:45:49Z","updated_at":"2018-03-15T15:48:09Z","closed_at":"2018-03-15T12:29:28Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Smoothieware/smoothie-v2/pulls/2","html_url":"https://github.com/Smoothieware/smoothie-v2/pull/2","diff_url":"https://github.com/Smoothieware/smoothie-v2/pull/2.diff","patch_url":"https://github.com/Smoothieware/smoothie-v2/pull/2.patch"},"body":"This pull request defines the possibility to configure ADC channel on ADC-only pins. Currently ADC channel is configured on multiplexed pins whose analog function is selected through the ENAIO register in the SCU. However, when we want for instance to use ADC-only pins for thermistor and their correspondent multiplexed pins for something else, we will have issues through this ENAIO register. \r\n\r\nNow, my idea is to change this register when we only configure a multiplexed pin on config file and remain unchanged when we only configure an ADC-only pin.\r\n\r\nExample:\r\n\r\nConsidering we want to connect thermistor pin on ADC0_0:\r\n \r\n- If we want to configure thermistor on ADC-only pin:\r\nhotend.thermistor_pin = ADC0_0     # Pin for the thermistor to read\\n\\\r\n\r\n- If we want to configure thermistor on multiplexed pin with analog function:\r\nhotend.thermistor_pin = p4_3     # Pin for the thermistor to read\\n\\"},"comment":{"url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/comments/373423950","html_url":"https://github.com/Smoothieware/smoothie-v2/pull/2#issuecomment-373423950","issue_url":"https://api.github.com/repos/Smoothieware/smoothie-v2/issues/2","id":373423950,"user":{"login":"tiagojbalmeida","id":34273996,"avatar_url":"https://avatars2.githubusercontent.com/u/34273996?v=4","gravatar_id":"","url":"https://api.github.com/users/tiagojbalmeida","html_url":"https://github.com/tiagojbalmeida","followers_url":"https://api.github.com/users/tiagojbalmeida/followers","following_url":"https://api.github.com/users/tiagojbalmeida/following{/other_user}","gists_url":"https://api.github.com/users/tiagojbalmeida/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojbalmeida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojbalmeida/subscriptions","organizations_url":"https://api.github.com/users/tiagojbalmeida/orgs","repos_url":"https://api.github.com/users/tiagojbalmeida/repos","events_url":"https://api.github.com/users/tiagojbalmeida/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojbalmeida/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T15:48:09Z","updated_at":"2018-03-15T15:48:09Z","author_association":"NONE","body":"I believe this is the correct way. According to the actual firmware, for instance if you want to configure ADC0_0 as a ADC-only pin, you cannot enable a digital function on P4_3 pin, because the function controlling ENAIO register enables analog function ADC0_0 for P4_3 pin. This works perfectly if we do use either ADC0_0 pin or P4_3 pin as ADC, however this would limit the amount of pins and also your board design, since we cannot connect something else (e.g. led) on that P4_3 pin. My PR provides the use of both pins independently as ADC, ADC0_0 would enable the ADC-only pin and P4_3 would enable the multiplexed pin with analog function. Maybe i'm missing something, but my tests did work as expected.   "}}
{"actor":{"display_login":"tiagojbalmeida"}}